Skip to content

Commit 5445366

Browse files
committed
feat: gh action
1 parent 1a5c648 commit 5445366

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Notify textbook repo of update
2+
on:
3+
push:
4+
branches: [main]
5+
6+
jobs:
7+
dispatch:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Trigger sync in ecc-textbook.notebooks
11+
env:
12+
TOKEN: ${{ secrets.ECC_TEXTBOOK_PAT }}
13+
REPO: ${{ github.repository }}
14+
run: |
15+
# Extract folder name (ecc-ai → ecc-ai)
16+
FOLDER_NAME="${REPO##*/}"
17+
18+
curl -s -X POST \
19+
-H "Authorization: token $TOKEN" \
20+
-H "Accept: application/vnd.github+json" \
21+
https://api.github.com/repos/ds-modules/ecc-textbook.notebooks/dispatches \
22+
-d "{\"event_type\": \"sync-module\", \
23+
\"client_payload\": {\"source_repo\": \"${REPO}\", \
24+
\"folder_name\": \"${FOLDER_NAME}\"}}"

0 commit comments

Comments
 (0)