Skip to content

Commit 9bc49cc

Browse files
Create main.yml
1 parent 32ef236 commit 9bc49cc

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Vercel Prod
2+
env:
3+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
4+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
5+
on:
6+
push:
7+
branches:
8+
- main
9+
- master
10+
11+
jobs:
12+
Deploy-Production:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Rename AWSL_API_HOST
17+
run: echo VITE_API_HOSTNAME=${{ secrets.AWSL_API_HOST }} > .env.production
18+
- name: Install Vercel CLI
19+
run: npm install --global vercel@latest
20+
- name: Install and Build
21+
run: npm i -g pnpm
22+
- name: Pull Vercel Environment Information
23+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
24+
- name: Build Project Artifacts
25+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
26+
- name: Deploy Project Artifacts to Vercel
27+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

0 commit comments

Comments
 (0)