Merge pull request #25 from BReady-Team/develop #2
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 Production Deploy | |
| on: | |
| push: | |
| branches: ['main'] | |
| permissions: | |
| contents: read | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| jobs: | |
| Production-Deploy: | |
| environment: production | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Vercel pull (production) | |
| run: npx vercel pull --yes --environment=production --token=$VERCEL_TOKEN | |
| - name: Clean old output | |
| run: rm -rf .vercel/output || true | |
| - name: Vercel build (production) | |
| run: npx vercel build --prod --token=$VERCEL_TOKEN | |
| - name: Deploy to Vercel (production) | |
| run: npx vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN |