-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.29 KB
/
Copy pathdeploy.yml
File metadata and controls
42 lines (35 loc) · 1.29 KB
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
41
42
name: Deploy to Vercel
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: vizualizer/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: vizualizer
# Pull project settings + env vars from Vercel
- name: Pull Vercel project settings
run: npx vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
working-directory: vizualizer
# Single build step: vercel build reads pulled env vars and runs next build.
# VERCEL_FORCE_NO_BUILD_CACHE=1 prevents stale cache from skipping the build.
- name: Build
run: npx vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
working-directory: vizualizer
env:
VERCEL_FORCE_NO_BUILD_CACHE: 1
NEXT_TELEMETRY_DISABLED: 1
- name: Deploy prebuilt output to production
run: npx vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
working-directory: vizualizer