File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 11name : Continuous Deployment
22
33on :
4+ # 1️⃣ Automatically trigger after CI passes (only for main)
45 workflow_run :
56 workflows : ["Continuous Integration"]
67 types :
78 - completed
89 branches :
910 - main
10- - ' feature/*'
11- workflow_dispatch : # allows manual deploys
11+
12+ # 2️⃣ Fallback: trigger on push (for non-main or if CI doesn’t exist)
13+ push :
14+ branches :
15+ - main
16+ - feature/** # optional — allow testing on feature branches
17+ # - dev # optional — allow dev environment deploys
18+
19+ # 3️⃣ Manual trigger anytime
20+ workflow_dispatch :
1221
1322jobs :
1423 deploy :
15- if : ${{ github.event.workflow_run.conclusion == 'success' }}
24+ # Only run auto-deploy if CI passed OR triggered manually/push
25+ if : >
26+ github.event_name == 'workflow_dispatch' ||
27+ github.event_name == 'push' ||
28+ (github.event_name == 'workflow_run' &&
29+ github.event.workflow_run.conclusion == 'success')
30+
1631 runs-on : ubuntu-latest
1732
1833 steps :
You can’t perform that action at this time.
0 commit comments