-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (44 loc) · 1.41 KB
/
deploy.yml
File metadata and controls
51 lines (44 loc) · 1.41 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
name: Deploy to Vercel
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
deploy-backend:
runs-on: ubuntu-latest
name: Deploy Backend
steps:
- uses: actions/checkout@v4
- name: Deploy Backend to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_BACKEND_PROJECT_ID }}
working-directory: ./backend
vercel-args: '--prod --confirm'
scope: ${{ secrets.VERCEL_ORG_ID }}
deploy-frontend:
runs-on: ubuntu-latest
name: Deploy Frontend
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: ./frontend
- name: Deploy Frontend to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_FRONTEND_PROJECT_ID }}
working-directory: ./frontend
vercel-args: '--prod --confirm'
scope: ${{ secrets.VERCEL_ORG_ID }}