Skip to content

Commit 3253907

Browse files
committed
fix: update deployment file
1 parent 2d1fdc5 commit 3253907

1 file changed

Lines changed: 8 additions & 32 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ name: Deploy to Vercel
33
on:
44
push:
55
branches: [main]
6-
pull_request:
7-
branches: [main]
86

97
jobs:
108
deploy:
119
runs-on: ubuntu-latest
1210

1311
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v4
12+
- uses: actions/checkout@v4
1613

1714
- name: Setup Node.js
1815
uses: actions/setup-node@v4
@@ -44,31 +41,10 @@ jobs:
4441
- name: Build project
4542
run: pnpm run build
4643

47-
- name: Install Vercel CLI
48-
run: pnpm add --global vercel@latest
49-
50-
- name: Pull Vercel Environment Information
51-
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
52-
env:
53-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
54-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
55-
56-
- name: Build Project Artifacts
57-
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
58-
env:
59-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
60-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
61-
62-
- name: Deploy Project Artifacts to Vercel
63-
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
64-
env:
65-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
66-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
67-
68-
# Deploy to production on main/master branch
69-
- name: Deploy to Production
70-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
71-
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
72-
env:
73-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
74-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
44+
- name: Deploy to Vercel
45+
uses: amondnet/vercel-action@v25
46+
with:
47+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
48+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
49+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
50+
vercel-args: '--prod'

0 commit comments

Comments
 (0)