Install Vercel Web Analytics (#20) #18
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: Deploy Production | |
| on: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: deploy-production | |
| cancel-in-progress: false | |
| jobs: | |
| # ============ Code Quality ============ | |
| lint: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run check:eslint | |
| - run: npm run check:prettier | |
| - run: npm run check:astro | |
| # ============ Deploy ============ | |
| deploy: | |
| name: Deploy to Vercel | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| environment: | |
| name: production | |
| url: ${{ steps.deploy.outputs.preview-url }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| - name: Fetch contributors data | |
| run: npm run fetch:contributors | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build site | |
| run: npm run build | |
| - name: Deploy to Vercel Production | |
| 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 }} | |
| vercel-args: '--prod --yes' | |
| target: production | |
| working-directory: ./ |