-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (62 loc) · 1.75 KB
/
deploy.yml
File metadata and controls
66 lines (62 loc) · 1.75 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI/CD Workflow
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
lint:
name: ESLint & Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint
type-check:
name: TypeScript Check
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
build_and_deploy:
name: Build and Deploy
runs-on: ubuntu-latest
needs: type-check
if: success()
env:
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
NEXT_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
AUTH_SECRET: ${{ secrets.AUTH_SECRET }}
NEXT_CLIENT_SECRET: ${{ secrets.NEXT_CLIENT_SECRET }}
NEXT_PUBLIC_CLIENT_ID: ${{ vars.NEXT_PUBLIC_CLIENT_ID }}
ID_URL: ${{ vars.ID_URL }}
SCOPE: ${{ vars.SCOPE }}
NEXT_PUBLIC_API_URL: ${{ vars.NEXT_PUBLIC_API_URL }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js & dependencies
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- name: Build
run: npm run build
- name: Deploy
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'