Merge pull request #1277 from yamcodes/dev #340
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 www (arkenv.js.org) | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "apps/www/**" | |
| - "packages/arkenv/**" | |
| - "packages/nextjs/**" | |
| - "packages/vite-plugin/**" | |
| - "packages/bun-plugin/**" | |
| - "packages/fumadocs-ui/**" | |
| - "packages/internal/**" | |
| - ".github/workflows/deploy-www.yml" | |
| - "pnpm-lock.yaml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| Deploy-Production: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Restore deploy metrics | |
| uses: actions/cache@v5 | |
| with: | |
| path: .github/deploy-metrics.json | |
| key: deploy-metrics-v1 | |
| - name: Install Vercel CLI | |
| # Pin the CLI to avoid upstream breakage from newly published majors. | |
| run: npm install --global vercel@54.7.1 | |
| - name: Pull Vercel Environment Information | |
| run: node scripts/vercel-wrapper.cjs pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Build Project Artifacts | |
| run: node scripts/vercel-wrapper.cjs build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Deploy Project Artifacts to Vercel | |
| run: node scripts/vercel-wrapper.cjs deploy --prebuilt --prod --archive=tgz --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Check prod deploy budget (alert only) | |
| continue-on-error: true | |
| run: node scripts/check-deploy-budget.cjs prod | |
| - name: Save deploy metrics | |
| if: always() | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: .github/deploy-metrics.json | |
| key: deploy-metrics-v1 |