Skip to content

Commit ed1d735

Browse files
Configured github actions
1 parent 9090805 commit ed1d735

File tree

5 files changed

+78
-0
lines changed

5 files changed

+78
-0
lines changed
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Vercel Production Backend Deployment
2+
env:
3+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
4+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_BACKEND }}
5+
on:
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
Deploy-Production-Backend:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: fastapi_backend
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
# Install Vercel CLI globally
19+
- name: Install Vercel CLI
20+
run: npm install --global vercel@latest
21+
22+
# Pull Vercel environment information
23+
- name: Pull Vercel Environment Information
24+
run: vercel pull --yes --environment=production --local-config=vercel.prod.json --token=${{ secrets.VERCEL_TOKEN }}
25+
26+
# Build project artifacts
27+
- name: Build Project Artifacts
28+
run: vercel build --prod --local-config=vercel.prod.json --token=${{ secrets.VERCEL_TOKEN }}
29+
30+
# Deploy project artifacts to Vercel
31+
- name: Deploy Project Artifacts to Vercel
32+
run: vercel deploy --prebuilt --prod --archive=split-tgz --local-config=vercel.prod.json --token=${{ secrets.VERCEL_TOKEN }}
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Vercel Production Frontend Deployment
2+
env:
3+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
4+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_FRONTEND }}
5+
on:
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
Deploy-Production-Frontend:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: nextjs-frontend
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
# Install pnpm
19+
- name: Install pnpm
20+
run: npm install -g pnpm
21+
22+
# Install Vercel CLI globally
23+
- name: Install Vercel CLI
24+
run: npm install --global vercel@latest
25+
26+
# Pull Vercel environment information
27+
- name: Pull Vercel Environment Information
28+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
29+
30+
# Build project artifacts
31+
- name: Build Project Artifacts
32+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
33+
34+
# Deploy project artifacts to Vercel
35+
- name: Deploy Project Artifacts to Vercel
36+
run: vercel deploy --prebuilt --prod --archive=split-tgz --token=${{ secrets.VERCEL_TOKEN }}

fastapi_backend/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vercel

fastapi_backend/vercel.prod.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"routes": [
3+
{
4+
"src": "/(.*)",
5+
"dest": "api/index.py"
6+
}
7+
]
8+
}

nextjs-frontend/components.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
"hooks": "@/hooks"
1919
}
2020
}
21+

0 commit comments

Comments
 (0)