Skip to content

Commit bda5a69

Browse files
authored
Update main.yml
1 parent f4062f8 commit bda5a69

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
1-
name: Deploy to Vercel Production
1+
name: Deploy to Vercel (Production)
22

33
on:
44
push:
55
branches:
6-
- main # Trigger on pushes to the 'main' branch
6+
- main
77

88
env:
99
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
1010
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
11+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
1112

1213
jobs:
1314
deploy:
15+
name: Vercel Production Deployment
1416
runs-on: ubuntu-latest
15-
environment: production # *** THIS IS KEY *** Tells GitHub this job deploys to the 'production' environment
17+
environment:
18+
name: production
19+
url: https://your-vercel-site.vercel.app
20+
1621
steps:
17-
- name: Checkout code
22+
- name: Checkout repository
1823
uses: actions/checkout@v4
1924

20-
- name: Deploy to Vercel
21-
uses: vercel/actions@v1
25+
- name: 🚀 Deploy to Vercel
26+
uses: amondnet/vercel-action@v25
2227
with:
23-
token: ${{ secrets.VERCEL_TOKEN }}
24-
vercel_project_id: ${{ env.VERCEL_PROJECT_ID }}
25-
vercel_org_id: ${{ env.VERCEL_ORG_ID }}
26-
prod: true # Deploy to production (live URL)
27-
github_token: ${{ secrets.GITHUB_TOKEN }} # REQUIRED: Enables Vercel action to update GitHub Deployment status
28+
vercel-token: ${{ env.VERCEL_TOKEN }}
29+
vercel-org-id: ${{ env.VERCEL_ORG_ID }}
30+
vercel-project-id: ${{ env.VERCEL_PROJECT_ID }}
31+
vercel-args: '--prod'
32+
working-directory: ./
33+
env:
34+
VERCEL_TOKEN: ${{ env.VERCEL_TOKEN }}
2835

29-
- name: Deployment confirmation
30-
run: echo "Vercel deployment to production environment initiated."
36+
- name: Confirm deployment
37+
run: echo "✅ Deployment to Vercel production triggered successfully."

0 commit comments

Comments
 (0)