-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd8bb43
commit 16e7415
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy to Vercel | ||
|
||
on: | ||
push: | ||
branches: [config_vercel] # Production deployment | ||
branches-ignore: [config_vercel] # Preview deployments for all other branches | ||
|
||
jobs: | ||
# deploy-frontend: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Install dependencies | ||
# run: yarn install | ||
# - name: Build frontend | ||
# run: yarn nx build fe | ||
# - name: Install Vercel CLI | ||
# run: npm install -g vercel | ||
# - name: Pull Vercel cache | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: ~/.vercel | ||
# key: ${{ runner.os }}-vercel-fe-${{ hashFiles('vercel.json') }} | ||
# - name: Deploy frontend with Vercel | ||
# run: vercel --prod -s tasktr-fe ${{ github.ref != 'refs/heads/main' && '--prebuilt' || '' }} | ||
# env: | ||
# VERCEL_TOKEN: ${{ secrets.VERCEL_ACCESS_TOKEN }} | ||
deploy-backend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Build backend | ||
run: yarn nx build be && yarn nx build fe | ||
- name: Install Vercel CLI | ||
run: npm install -g vercel | ||
- name: Pull Vercel cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.vercel | ||
key: ${{ runner.os }}-vercel-be-${{ hashFiles('vercel.json') }} | ||
- name: Deploy backend with Vercel | ||
run: vercel --prod -s tasktr-be ${{ github.ref != 'refs/heads/main' && '--prebuilt' || '' }} | ||
env: | ||
VERCEL_TOKEN: ${{ secrets.VERCEL_ACCESS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "https://openapi.vercel.sh/vercel.json", | ||
"github": { | ||
"enabled": false | ||
}, | ||
"functions": { | ||
"dist/apps/be/main.js": { | ||
"runtime": "nodejs" | ||
} | ||
}, | ||
"rewrites": [ | ||
{ | ||
"source": "/be/api/(.*)", | ||
"destination": "/api/$1" | ||
}, | ||
{ | ||
"source": "/(.*)", | ||
"destination": "/fe/$1" | ||
} | ||
] | ||
} |
16e7415
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
tasktr-be – ./apps/be
tasktr-be-git-configvercel-l-huy-giangs-projects.vercel.app
tasktr-be-l-huy-giangs-projects.vercel.app
tasktr-be.vercel.app