Skip to content

Commit

Permalink
CI: Use repository-dispatch action
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 committed Mar 7, 2024
1 parent 3ab4ffc commit 36461cd
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/build_website.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Ref: https://medium.com/hostspaceng/triggering-workflows-in-another-repository-with-github-actions-4f581f8e0ceb
# https://docs.github.com/en/rest/about-the-rest-api/api-versions
# Ref: https://github.com/marketplace/actions/repository-dispatch
name: Build WebsiteTrigger Target Workflow

on:
Expand All @@ -12,17 +11,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Trigger Building plotnine.org
run: |
# Set the required variables
repo_owner="has2k1"
repo_name="plotnine.org"
event_type="trigger-workflow"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.BUILD_PLOTNINE_WEBSITE }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"unit\": false, \"integration\": true}}"
- name: Build Stable Documentation
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT_PLOTNINE_WEBSITE }}
repository: has2k1/plotnine.org
event-type: push-plotnine-examples-main

0 comments on commit 36461cd

Please # to comment.