Skip to content

Commit 3d64aaa

Browse files
matthieubosquetPreciousOritsedere
authored andcommitted
Add CD
1 parent 39e6a10 commit 3d64aaa

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/CD.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Vercel Production Deployment
2+
env:
3+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
4+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
5+
on:
6+
workflow_dispatch:
7+
# Uncomment when vercel project setup
8+
# push:
9+
# branches:
10+
# - main
11+
jobs:
12+
Deploy-Production:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v5
16+
17+
- name: Set up Node.js version
18+
uses: actions/setup-node@v5
19+
with:
20+
node-version: 22
21+
22+
- name: Install Vercel CLI
23+
run: npm install --global vercel@latest
24+
25+
- name: Pull Vercel Environment Information
26+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
27+
28+
- name: Build Project Artifacts
29+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
30+
31+
- name: Deploy Project Artifacts to Vercel
32+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

.github/workflows/CI.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Vercel Preview Deployment
2+
env:
3+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
4+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
5+
on:
6+
workflow_dispatch:
7+
# Uncomment when vercel project setup
8+
# push:
9+
# branches-ignore:
10+
# - main
11+
jobs:
12+
Deploy-Preview:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v5
16+
17+
- name: Set up Node.js version
18+
uses: actions/setup-node@v5
19+
with:
20+
node-version: 22
21+
22+
- name: Install Vercel CLI
23+
run: npm install --global vercel@latest
24+
25+
- name: Pull Vercel Environment Information
26+
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
27+
28+
- name: Build Project Artifacts
29+
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
30+
31+
- name: Deploy Project Artifacts to Vercel
32+
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

0 commit comments

Comments
 (0)