⚡ Bolt: collapse redundant database queries in badge evaluation engine #254
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Preview deployment + smoke test for every PR. | |
| # | |
| # ⚠️ DEPLOYMENT DISABLED — 2026-07-14 | |
| # This workflow has been disabled to halt all deployments. | |
| # To re-enable, remove the `if: false` condition from the preview job. | |
| # | |
| # Deploys a Vercel preview build, then runs scripts/smoke-prod.sh against the | |
| # preview URL and reports the result as a PR comment. Keeps "ship to preview" | |
| # cheap and verifiable *before* anything touches production. | |
| # | |
| # Required repo secrets (Settings → Secrets and variables → Actions): | |
| # VERCEL_TOKEN — org/user token with deploy scope | |
| # VERCEL_ORG_ID — Vercel team/org id | |
| # VERCEL_PROJECT_ID — Vercel project id (amph-v2) | |
| name: Deploy Preview | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| concurrency: | |
| group: preview-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| preview: | |
| name: Vercel Preview + Smoke | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| if: false # DEPLOYMENT DISABLED — 2026-07-14 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Deploy preview to Vercel | |
| id: deploy | |
| uses: amondnet/vercel-action@v42 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
| github-comment: 0 # we post our own summary comment below | |
| - name: Smoke test preview | |
| id: smoke | |
| continue-on-error: true | |
| env: | |
| PROD_URL: ${{ steps.deploy.outputs.preview-url }} | |
| run: bash scripts/smoke-prod.sh | |
| - name: Comment PR | |
| if: always() | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const ok = '${{ steps.smoke.outcome }}' === 'success'; | |
| const url = '${{ steps.deploy.outputs.preview-url }}'; | |
| const body = `#### ${ok ? '✅ Preview smoke passed' : '❌ Preview smoke failed'}\n\nPreview URL: ${url}\n\nRun: [${context.runId}](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})`; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body, | |
| }); |