Skip to content

Commit

Permalink
Add repository dispatch trigger (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
kin0992 authored Mar 1, 2024
1 parent 7ef5976 commit cc14556
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/deploy_website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
- dev
- prod

# Allows external webhook trigger
repository_dispatch:
types:
- webhook

# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
Expand All @@ -26,8 +31,8 @@ jobs:

cd_deploy:
name: Deploy to S3 (on ${{ matrix.environment }})
# Trigger when the PR is merged
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
# Trigger when the PR is merged or on a webhook (e.g. trigger deploy from CMS)
if: (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'repository_dispatch'
runs-on: 'ubuntu-latest'
strategy:
matrix:
Expand Down

0 comments on commit cc14556

Please sign in to comment.