diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..d9cb53b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,48 @@ +name: Deploy + +on: + workflow_dispatch: + +concurrency: + group: production-deploy + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 60 + env: + HOSTING_AUTH_TOKEN: ${{ secrets.HOSTING_AUTH_TOKEN }} + HOSTING_SITE_ID: ${{ secrets.HOSTING_SITE_ID }} + QUAKE_RENDER_BUNDLE_AVIF_EFFORT: "0" + QUAKE_SHAREWARE_URL: ${{ secrets.QUAKE_SHAREWARE_URL }} + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 10.33.0 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - name: Check build inputs + run: | + test -n "$QUAKE_SHAREWARE_URL" + test -n "$HOSTING_AUTH_TOKEN" + test -n "$HOSTING_SITE_ID" + + - run: pnpm install --frozen-lockfile + + - run: pnpm build:full + + - name: Publish prebuilt site + run: | + pnpm --package=netlify-cli@latest dlx netlify deploy \ + --prod \ + --dir=dist \ + --no-build \ + --auth "$HOSTING_AUTH_TOKEN" \ + --site "$HOSTING_SITE_ID"