Deploy to Vercel #257
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 to Vercel | |
| on: | |
| push: | |
| branches: [main, master] | |
| schedule: | |
| - cron: '0 * * * *' | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| jobs: | |
| deploy: | |
| name: Deploy to Vercel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build project | |
| run: bun run build | |
| env: | |
| PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }} | |
| PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.PUBLIC_SUPABASE_ANON_KEY }} | |
| - name: Install Vercel CLI | |
| run: bun add -g vercel@latest | |
| - name: Pull Vercel Environment Information | |
| run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Build Project Artifacts | |
| run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Deploy Project Artifacts to Vercel | |
| run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |