ci: move vercel deployment to github actions #3
This file contains 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: Preview | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: oven-sh/setup-bun@v1 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.bun/install/cache | |
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.bun }}-bun- | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Pull Vercel Environment Information | |
run: bunx vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
working-directory: apps/web | |
- name: Build Project Artifacts | |
run: bun run build | |
- name: Deploy Project Artifacts to Vercel | |
run: bunx vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | |
working-directory: apps/web |