Vercel Deploy (Test Envs) #74
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
| name: Vercel Deploy (Test Envs) | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup Node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Link Vercel project | |
| # hsbexpo — do not use stale VERCEL_* secrets (they pointed at hyperlinksspaceprsbot). | |
| # .vercel/project.json is gitignored, so IDs are inlined here. | |
| run: | | |
| echo "VERCEL_ORG_ID=team_mVzQdD8oDUbuxCjFcZKAeekc" >> "$GITHUB_ENV" | |
| echo "VERCEL_PROJECT_ID=prj_n2G3iB1fyD0QFX0jNvOyAnu1X1rO" >> "$GITHUB_ENV" | |
| mkdir -p .vercel | |
| printf '%s\n' '{"orgId":"team_mVzQdD8oDUbuxCjFcZKAeekc","projectId":"prj_n2G3iB1fyD0QFX0jNvOyAnu1X1rO"}' > .vercel/project.json | |
| echo "Linked hsbexpo" | |
| - name: Deploy to Vercel | |
| # Full remote build (not --prebuilt) so /api serverless routes stay intact. | |
| # Pin a modern CLI — API rejects vercel@38 ("requires 47.2.2 or later"). | |
| run: npx vercel@58.4.4 deploy --prod --yes --token "$VERCEL_TOKEN" | |
| env: | |
| VERCEL_ORG_ID: ${{ env.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ env.VERCEL_PROJECT_ID }} | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| SKIP_DB_MIGRATE: "1" |