fix: UI #4
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
| # Deploys the RatMD web app to Vercel. | |
| # | |
| # Secrets required (set in GitHub repo → Settings → Secrets and variables → Actions): | |
| # VERCEL_TOKEN — API token from https://vercel.com/account/tokens | |
| # VERCEL_ORG_ID — Org ID from .vercel/project.json after running `vercel link` | |
| # VERCEL_PROJECT_ID — Project ID from same file | |
| name: Deploy to Vercel | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: app/web/package-lock.json | |
| - run: npm ci | |
| working-directory: app/web | |
| - run: npm run build | |
| working-directory: app/web | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Deploy to Vercel | |
| uses: amondnet/vercel-action@v25 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
| vercel-args: --prod | |
| working-directory: app/web |