docs: publish to GitHub Pages instead of ReadTheDocs - #4
Merged
Conversation
Build the Sphinx docs in GitHub Actions and deploy them to GitHub Pages on pushes to main; pull requests build the docs without deploying. The package is not installed in the docs job: docs/conf.py already puts the repository root on sys.path, and setup.py imports xarray_video to read __version__, which makes an isolated build of the package fail. Installing only the runtime and docs requirements avoids that entirely. Also: - declare sphinx explicitly in docs/requirements.txt and drop the xarray_video entry, which would have pulled the released package from PyPI over the checkout - drop .gitlab-ci.yml, whose pages job published a pre-built docs/_build/html, and stop tracking that build output - point the documentation links at https://oceanum.github.io/xarray-video/ and move setup.py's link to project_urls, where setuptools reads it Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sv6cKAFfxedP6NjhEYLTdE
ondave
marked this pull request as ready for review
July 10, 2026 05:56
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.
Moves documentation hosting from ReadTheDocs to GitHub Pages.
Docs will be served at https://oceanum.github.io/xarray-video/. Pages is already enabled on this repo with GitHub Actions as the source, so the site publishes on the first push to
mainafter this merges.What changed
.github/workflows/docs.yml(new) — builds the Sphinx docs on every push, PR and manual dispatch; deploys to Pages only frommain. PRs get a build-only run, so a broken docs build is caught before merge.docs/requirements.txt— declaressphinxexplicitly (it was only arriving transitively viapydata-sphinx-theme) and drops thexarray_videoentry, which on CI would have installed the released package from PyPI instead of the checkout..gitlab-ci.yml(deleted) — itspagesjob just copied a pre-builtdocs/_build/html. Dead now that the repo lives on GitHub.docs/_build/— 86 committed build artifacts untracked, and the.gitignorerule (which was commented out to allow the GitLab job to consume them) re-enabled.README.md,README.rst,setup.py— documentation links repointed. Insetup.pythe link moves from adocumentation=kwarg, which is not a validsetup()option and was silently discarded, intoproject_urls, where setuptools actually reads it.README.rstalso picks up theoceanum-io→oceanumorg rename.Note on not installing the package
The docs job installs the runtime and docs requirements but not
xarray-videoitself.docs/conf.pyalready doessys.path.insert(0, os.path.abspath("..")), so autodoc imports the package from the source tree. Installing it is a trap:setup.pyimportsxarray_videoto read__version__, so a PEP 517 isolated build fails on the missingnumcodecs, and--no-build-isolationthen fails on the missingsetuptoolsin a Python 3.12 venv. Skipping the install sidesteps both.Verification
Ran the workflow's exact steps locally in a clean Python 3.12 venv against a clean tree:
pip install -r requirements.txt && pip install -r docs/requirements.txt— OKsphinx-build -b html docs docs/_build/html— exit 0, 22 HTML pages, 5 warnings (all pre-existing, see below)H264,VideoDataset,VideoArray,open_videoclass pages)xarray-video.readthedocsreference remains in sources or built outputsetup.pystill executes; metadata now emitsProject-URL: Documentation, https://oceanum.github.io/xarray-video/Pre-existing warnings, deliberately not fixed here
Out of scope for a hosting migration, but worth a follow-up:
language = Noneindocs/conf.pyis invalid; Sphinx falls back toen.html_static_pathentry_staticdoes not exist.docs/xarray_video.codecs.rstautodocsxarray_video.codecs.mp4, a module that no longer exists.docs/modules.rstis not in any toctree.The build is not run with
-W, so these do not fail CI.Follow-ups outside this PR
xarray-video.readthedocs.io; worth switching to the Pages URL once the first deploy is green..readthedocs.yamlin the repo), so it needs to be archived or deleted there. Until then RTD builds will fail, becausedocs/requirements.txtno longer installs the package.🤖 Generated with Claude Code
https://claude.ai/code/session_01Sv6cKAFfxedP6NjhEYLTdE