File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 1- name : Deploy production docs
1+ name : Deploy docs
22
33on :
44 pull_request :
55 types :
66 - closed
77 branches :
88 - " changeset-release/main"
9+ push :
10+ branches :
11+ - main
912
1013jobs :
11- deploy-production :
14+ deploy :
1215 runs-on : ubuntu-latest
13- if : github.event.pull_request.merged == true
16+ if : |
17+ (github.event_name == 'pull_request' && github.event.pull_request.merged == true) ||
18+ (github.event_name == 'push' && github.ref == 'refs/heads/main')
1419
1520 steps :
1621 - uses : actions/checkout@v4
2025
2126 - name : Install Vercel CLI
2227 run : npm install --global vercel@latest
23- - name : Deploy to Vercel
28+
29+ - name : Deploy to Production
30+ if : github.event_name == 'pull_request' && github.event.pull_request.merged == true
2431 run : vercel --prod --token=${{ secrets.VERCEL_TOKEN }}
2532 env :
2633 VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
2734 VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
35+
36+ - name : Deploy to Preview
37+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
38+ run : vercel --token=${{ secrets.VERCEL_TOKEN }}
39+ env :
40+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
41+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
You can’t perform that action at this time.
0 commit comments