Skip to content

Commit 7c41330

Browse files
committed
ci: add vercel config and github workflows for deployments
Add vercel.json configuration file and two GitHub workflows: - Hotfix deployment triggered on push to hotfix branch - Production deployment triggered on tag pushes Also add marked package dependency for markdown processing
1 parent 553aae6 commit 7c41330

File tree

4 files changed

+105
-0
lines changed

4 files changed

+105
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Hotfix Deployment
2+
3+
env:
4+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
5+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
6+
7+
on:
8+
push:
9+
branches:
10+
- hotfix
11+
12+
jobs:
13+
Deploy-Production:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '18'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Install Vercel CLI
29+
run: npm install --global vercel@latest
30+
31+
- name: Pull Vercel Environment Information
32+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
33+
34+
- name: Build Project Artifacts
35+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
36+
37+
- name: Deploy Project Artifacts to Vercel
38+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
39+
40+
- name: Comment deployment URL
41+
if: success()
42+
run: |
43+
echo "🔥 Hotfix deployment successful!"
44+
echo "Branch: ${{ github.ref_name }}"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Production Tag Deployment
2+
3+
env:
4+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
5+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
6+
7+
on:
8+
push:
9+
# Pattern matched against refs/tags
10+
tags:
11+
- '*' # Push events to every tag not containing /
12+
13+
jobs:
14+
Deploy-Production:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '18'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Install Vercel CLI
30+
run: npm install --global vercel@latest
31+
32+
- name: Pull Vercel Environment Information
33+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
34+
35+
- name: Build Project Artifacts
36+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
37+
38+
- name: Deploy Project Artifacts to Vercel
39+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
40+
41+
- name: Comment deployment URL
42+
if: success()
43+
run: |
44+
echo "🚀 Production deployment successful!"
45+
echo "Tag: ${{ github.ref_name }}"

pnpm-lock.yaml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vercel.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://openapi.vercel.sh/vercel.json",
3+
"git": {
4+
"deploymentEnabled": false
5+
}
6+
}

0 commit comments

Comments
 (0)