-
-
Notifications
You must be signed in to change notification settings - Fork 36
40 lines (30 loc) · 1.12 KB
/
vercel-merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Deploy to Vercel on Merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
permissions: write-all
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v4
- name: Install Bun
run: |
curl -fsSL https://bun.sh/install | bash
echo "$HOME/.bun/bin" >> $GITHUB_PATH
- name: Install Global Package with Bun
run: bun install --global vercel@latest
- name: Generate Source Code Preview
run: bun run generate-preview
- 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 }}
env:
ANALYTICS_CLIENT_URL: ${{ secrets.ANALYTICS_CLIENT_URL }}
ANALYTICS_CLIENT_SECRET: ${{ secrets.ANALYTICS_CLIENT_SECRET }}
ANALYTICS_CLIENT_ID: ${{ secrets.ANALYTICS_CLIENT_ID }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}