1- name : Deploy to GitHub Pages
1+ name : Deploy to Vercel
22
33on :
44 push :
55 branches : [ main ]
66 pull_request :
77 branches : [ main ]
88
9- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10- permissions :
11- contents : read
12- pages : write
13- id-token : write
14-
15- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17- concurrency :
18- group : " pages"
19- cancel-in-progress : false
20-
219jobs :
2210 deploy :
2311 runs-on : ubuntu-latest
2412 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
25- environment :
26- name : github-pages
27- url : ${{ steps.deployment.outputs.page_url }}
2813
2914 steps :
3015 - name : Checkout code
3116 uses : actions/checkout@v4
3217
33- - name : Setup Pages
34- uses : actions/configure-pages@v4
35-
36- - name : Upload artifact
37- uses : actions/upload-pages-artifact@v3
18+ - name : Deploy to Vercel
19+ uses : amondnet/vercel-action@v25
3820 with :
39- path : ' . '
40-
41- - name : Deploy to GitHub Pages
42- id : deployment
43- uses : actions/deploy-pages@v4
21+ vercel-token : ${{ secrets.VERCEL_TOKEN }}
22+ vercel-org-id : ${{ secrets.VERCEL_ORG_ID }}
23+ vercel-project-id : ${{ secrets.VERCEL_PROJECT_ID }}
24+ working-directory : ./
25+ scope : ${{ secrets.VERCEL_ORG_ID }}
4426
4527 - name : Deployment Status
4628 run : |
4729 echo "🚀 Deployment completed successfully!"
4830 echo "📊 This will show deployment stats in GitHub"
49- echo "🔗 Site deployed to: ${{ steps.deployment.outputs.page_url }} "
31+ echo "🔗 Site deployed to: https://prepguides-dev.vercel.app "
5032
5133 preview :
5234 runs-on : ubuntu-latest
@@ -56,16 +38,17 @@ jobs:
5638 - name : Checkout code
5739 uses : actions/checkout@v4
5840
59- - name : Preview Validation
60- run : |
61- echo "🔍 Validating files for preview deployment..."
62- find . -name "*.html" -not -path "./.git/*" | head -5 | while read file; do
63- echo "Preview checking: $file"
64- done
65- echo "✅ Preview validation completed"
41+ - name : Deploy Preview to Vercel
42+ uses : amondnet/vercel-action@v25
43+ with :
44+ vercel-token : ${{ secrets.VERCEL_TOKEN }}
45+ vercel-org-id : ${{ secrets.VERCEL_ORG_ID }}
46+ vercel-project-id : ${{ secrets.VERCEL_PROJECT_ID }}
47+ working-directory : ./
48+ scope : ${{ secrets.VERCEL_ORG_ID }}
49+ vercel-args : ' --prod=false'
6650
67- - name : Preview Ready
51+ - name : Preview Deployment Status
6852 run : |
69- echo "🔍 Preview deployment ready !"
53+ echo "🔍 Preview deployment completed !"
7054 echo "📊 This will show preview deployment stats in GitHub"
71- echo "✅ Preview validation completed successfully"
0 commit comments