Add auto rebuild trigger, PR preview, and diff-only execution#1
Merged
Conversation
I1 — trigger-docs-rebuild.yaml On push to main (when notebook content changes), POST to ReadTheDocs API to rebuild scverse/spatialdata-plot's `latest` version. Combined with the lib's `post_checkout: git submodule update --remote --recursive`, this propagates new gallery content end-to-end without manual submodule bumps. Skips silently if RTD_TOKEN secret is unset. Required setup: add RTD_TOKEN repo secret (token from https://readthedocs.org/accounts/tokens/). I4 — preview.yaml On every PR (touching notebook content), build the lib's docs against the PR's notebook content, deploy to gh-pages under pr-<N>/, and post a preview link comment. Updates the comment in place on subsequent pushes. Required setup: enable GitHub Pages on this repo (Settings -> Pages, source: Deploy from a branch, branch: gh-pages /). I6 — execute.yaml: only diff-touched notebooks on PR Schedule + workflow_dispatch still re-execute everything; PRs now run only the notebooks they touched. Keeps PR feedback fast as the gallery grows. Mirrors sklearn's gallery CI pattern.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds three workflows that fully automate the end-to-end flow from notebook PR → preview → merge → docs rebuild on RTD, and trims execute-on-PR to only diff-touched notebooks.
trigger-docs-rebuild.yamlspatialdata-plot/latest. Combined with the lib'spost_checkout: git submodule update --remote --recursive, propagates new content without a manual submodule-bump PR.preview.yamlgh-pages/pr-<N>/. Comments a preview link on the PR (updates in place on subsequent pushes).execute.yamlRequired manual setup before merging
RTD_TOKENsecret: generate at https://readthedocs.org/accounts/tokens/, add to this repo's Settings → Secrets → Actions. Without it,trigger-docs-rebuild.yamlskips silently and you need a manual submodule bump for new content to appear.gh-pages/. Required forpreview.yamlto publish PR previews.Both can be done after merge, but features stay dormant until they are.
Test plan
trigger-docs-rebuildis push-only,previewrequires Pages enabled, andexecuteruns only on changed notebooks of which there are none).getting_started.ipynb) and verify the preview comment appears and links to a working preview.Related