Skip to content

Commit f9987b0

Browse files
committed
Only execute preview workflow when base ref is main
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
1 parent 41e7f27 commit f9987b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/preview.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ jobs:
1616
if: |
1717
github.event.workflow_run.event == 'pull_request' &&
1818
github.event.workflow_run.conclusion == 'success' &&
19-
github.event.workflow_run.name == 'Build Website'
19+
github.event.workflow_run.name == 'Build Website' &&
20+
github.event.workflow_run.head_branch == 'main'
2021
permissions:
2122
actions: read
2223
pull-requests: write

0 commit comments

Comments
 (0)