Skip to content

Commit 7c87ef7

Browse files
committed
chore: guard deploy PR checks
1 parent 782dbc0 commit 7c87ef7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ permissions:
1515
jobs:
1616
# from https://github.com/peter-evans/create-pull-request/blob/main/docs/examples.md#keep-a-branch-up-to-date-with-another
1717
deploy-staging:
18+
if: github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/')
1819
runs-on: ubuntu-latest
1920
steps:
2021
- uses: actions/checkout@v4
@@ -39,6 +40,7 @@ jobs:
3940

4041
# from https://github.com/peter-evans/create-pull-request/blob/main/docs/examples.md#keep-a-branch-up-to-date-with-another
4142
deploy-production:
43+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/staging')
4244
runs-on: ubuntu-latest
4345
steps:
4446
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)