Update README.md #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Notify textbook repo of update | |
on: | |
push: | |
branches: [main] | |
jobs: | |
dispatch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger sync in ecc-textbook.notebooks | |
env: | |
TOKEN: ${{ secrets.ECC_TEXTBOOK_PAT }} | |
REPO: ${{ github.repository }} # e.g. ds-modules/ecc-biology | |
run: | | |
# Extract folder name (ecc-biology → ecc-biology) | |
FOLDER_NAME="${REPO##*/}" | |
curl -s -X POST \ | |
-H "Authorization: token $TOKEN" \ | |
-H "Accept: application/vnd.github+json" \ | |
https://api.github.com/repos/ds-modules/ecc-textbook.notebooks/dispatches \ | |
-d "{\"event_type\": \"sync-module\", \ | |
\"client_payload\": {\"source_repo\": \"${REPO}\", \ | |
\"folder_name\": \"${FOLDER_NAME}\"}}" |