Skip to content

feat: notify biolm-web on notebook changes - #14

Merged
ChanceChallacombe merged 2 commits into
mainfrom
chance/notebook-sync-automation
Apr 27, 2026
Merged

ChanceChallacombe merged 2 commits into
mainfrom
chance/notebook-sync-automation

Conversation

@ChanceChallacombe

@ChanceChallacombe ChanceChallacombe commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

What this does

Adds .github/workflows/notify-notebook-sync.yml — the source-side trigger for the cross-repo notebook sync pipeline.

When content/*.ipynb files change on main, this workflow fires a notebook-sync repository_dispatch to BioLM/biolm_web. The handler there (handle-notebook-sync.yml) converts notebooks to self-contained HTML, generates a JupyterPage Django migration, and opens a bot PR. On next deploy, manage.py migrate loads the updated notebook pages into the DB.

workflow_dispatch is also supported for a full re-sync of all notebooks without needing a new commit (useful after merging the companion PR or recovering from a failed run).


Flow

tutorials-and-guides: push to main (content/*.ipynb changed)
        ↓
notify-notebook-sync.yml (this file)
  - git diff HEAD~1 HEAD → detect changed .ipynb files
  - repository_dispatch → BioLM/biolm_web, event: notebook-sync
    payload: { notebooks: [{filename, change_type}], source_sha }
        ↓
biolm_web: handle-notebook-sync.yml
  - Checkout biolm_web + tutorials-and-guides
  - pip install nbconvert==7.16.4 nbformat==5.10.4 beautifulsoup4
  - python scripts/convert_notebooks_to_html.py  → jupyter_html/*.html
  - python scripts/generate_jupyter_migration.py → ui/migrations/XXXX_load_synced_jupyter_pages.py
  - peter-evans/create-pull-request → bot PR on biolm_web

Auth

Uses the org-level APP_ID + APP_PRIVATE_KEY GitHub App secrets (same as protocol-sync and model-sync). No new secrets required.


Companion PR

BioLM/biolm_web #130 — adds handle-notebook-sync.yml, scripts/generate_jupyter_migration.py, and the jupyter_html/ directory. Both PRs should be merged together (or biolm_web first).


Fixes in latest commit (vs original PR)

  • Repo name bug: BioLM/biolm-web (hyphen) → BioLM/biolm_web (underscore) in the dispatch target and app-token repositories: field. The hyphenated name would have silently failed — GitHub would return a 404 on dispatch.
  • Concurrency block: added cancel-in-progress: true to match all other sync workflows in the pipeline.

Dispatches notebook-sync repository_dispatch to BioLM/biolm-web whenever
content/*.ipynb files change on main. Also supports workflow_dispatch for
manual full-sync triggering. Uses existing GitHub App auth pattern.
- repositories: biolm-web → biolm_web (underscore) in app-token step
- repository: BioLM/biolm-web → BioLM/biolm_web in dispatch step
  (hyphen would silently fail — repo is named with underscore)
- Add concurrency cancel-in-progress to match all other sync workflows
@ChanceChallacombe
ChanceChallacombe merged commit 440c578 into main Apr 27, 2026
2 checks passed
@ChanceChallacombe
ChanceChallacombe deleted the chance/notebook-sync-automation branch April 27, 2026 22:58
ChanceChallacombe added a commit that referenced this pull request Apr 30, 2026
* feat: notify biolm-web on notebook changes

Dispatches notebook-sync repository_dispatch to BioLM/biolm-web whenever
content/*.ipynb files change on main. Also supports workflow_dispatch for
manual full-sync triggering. Uses existing GitHub App auth pattern.

* fix: correct repo name biolm-web → biolm_web, add concurrency block

- repositories: biolm-web → biolm_web (underscore) in app-token step
- repository: BioLM/biolm-web → BioLM/biolm_web in dispatch step
  (hyphen would silently fail — repo is named with underscore)
- Add concurrency cancel-in-progress to match all other sync workflows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant