Skip to content

Commit aa926dc

Browse files
committed
ci: prevent deploy workflow from running when CI workflow failed
1 parent f3e8835 commit aa926dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/cd.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
jobs:
1717
deployment:
1818
runs-on: ubuntu-latest
19+
# only run if CI workflow completed successfully
20+
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
21+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1922
environment: staging
2023
steps:
2124
- name: Deploy

0 commit comments

Comments
 (0)