|
1 | | -name: Deploy to Vercel Production |
| 1 | +name: Deploy to Vercel (Production) |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: |
6 | | - - main # Trigger on pushes to the 'main' branch |
| 6 | + - main |
7 | 7 |
|
8 | 8 | env: |
9 | 9 | VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} |
10 | 10 | VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} |
| 11 | + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} |
11 | 12 |
|
12 | 13 | jobs: |
13 | 14 | deploy: |
| 15 | + name: Vercel Production Deployment |
14 | 16 | 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 | + |
16 | 21 | steps: |
17 | | - - name: Checkout code |
| 22 | + - name: Checkout repository |
18 | 23 | uses: actions/checkout@v4 |
19 | 24 |
|
20 | | - - name: Deploy to Vercel |
21 | | - uses: vercel/actions@v1 |
| 25 | + - name: 🚀 Deploy to Vercel |
| 26 | + uses: amondnet/vercel-action@v25 |
22 | 27 | 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 }} |
28 | 35 |
|
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