Skip to content

Commit 231e24a

Browse files
authored
Merge pull request #44 from nimblehq/bug/fix-deploy-workflow
Fix cannot deploy on master branch
2 parents c7b0ec3 + 4778563 commit 231e24a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,20 @@ env:
2121
jobs:
2222
deploy:
2323
runs-on: ubuntu-latest
24-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
24+
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
2525
steps:
2626
- name: Cancel previous runs
2727
uses: styfle/cancel-workflow-action@0.5.0
2828
with:
2929
access_token: ${{ github.token }}
3030

3131
- uses: actions/checkout@v2.3.2
32+
with:
33+
ref: ${{ github.event.workflow_run.head_branch || github.ref }}
3234

3335
- uses: nimblehq/branch-tag-action@v1.1
36+
with:
37+
ref: ${{ github.event.workflow_run.head_branch || github.ref }}
3438

3539
- name: Set HEROKU_APP
3640
run: |

0 commit comments

Comments
 (0)