Skip to content

Commit

Permalink
ci(build): trigger build only on successful scrape
Browse files Browse the repository at this point in the history
  • Loading branch information
jthvai committed Jul 24, 2024
1 parent 1777512 commit a9ef7bd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request_target:
types: [opened, synchronize, reopened, labeled]
paths-ignore: ['.vscode/**']
# trigger after successful scrape, as push from scrape action doesn't trigger a push event
# push from scrape action doesn't trigger a push event
workflow_run:
workflows: [Scrape]
types: [completed]
Expand All @@ -18,8 +18,11 @@ permissions:

jobs:
swa:
# if not a PR, or an internal PR, or PR has 'safe to test' label
if: github.event_name != 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository || contains(github.event.pull_request.labels.*.name, 'safe to test')
# if a push, or a successful scrape, or PR has 'safe to test' label
if: >-
github.event_name == 'push' ||
github.event.workflow_run.conclusion == 'success' ||
contains(github.event.pull_request.labels.*.name, 'safe to test')
runs-on: ubuntu-latest
name: Static Web App
steps:
Expand Down

0 comments on commit a9ef7bd

Please sign in to comment.