-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.43 KB
/
Copy pathCD.yml
File metadata and controls
52 lines (43 loc) · 1.43 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
name: Frontend CD
on:
workflow_run:
workflows:
- Frontend CI
types:
- completed
permissions:
contents: read
jobs:
deploy-production:
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'main'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel environment
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: team_0BnzV7WrYBWVnkDt0DnRWVQJ
VERCEL_PROJECT_ID: prj_DvHpVOyD3L0aXhJY5z90TdPZHXTf
- name: Build project artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: team_0BnzV7WrYBWVnkDt0DnRWVQJ
VERCEL_PROJECT_ID: prj_DvHpVOyD3L0aXhJY5z90TdPZHXTf
- name: Deploy to Vercel production
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: team_0BnzV7WrYBWVnkDt0DnRWVQJ
VERCEL_PROJECT_ID: prj_DvHpVOyD3L0aXhJY5z90TdPZHXTf