Skip to content

Update README.md

Update README.md #5

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}\"}}"