Skip to content

docs: publish to GitHub Pages instead of ReadTheDocs - #4

Merged
ondave merged 1 commit into
mainfrom
docs/migrate-readthedocs-to-github-pages
Jul 10, 2026
Merged

docs: publish to GitHub Pages instead of ReadTheDocs#4
ondave merged 1 commit into
mainfrom
docs/migrate-readthedocs-to-github-pages

Conversation

@ondave

@ondave ondave commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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 main after this merges.

What changed

  • .github/workflows/docs.yml (new) — builds the Sphinx docs on every push, PR and manual dispatch; deploys to Pages only from main. PRs get a build-only run, so a broken docs build is caught before merge.
  • docs/requirements.txt — declares sphinx explicitly (it was only arriving transitively via pydata-sphinx-theme) and drops the xarray_video entry, which on CI would have installed the released package from PyPI instead of the checkout.
  • .gitlab-ci.yml (deleted) — its pages job just copied a pre-built docs/_build/html. Dead now that the repo lives on GitHub.
  • docs/_build/ — 86 committed build artifacts untracked, and the .gitignore rule (which was commented out to allow the GitLab job to consume them) re-enabled.
  • README.md, README.rst, setup.py — documentation links repointed. In setup.py the link moves from a documentation= kwarg, which is not a valid setup() option and was silently discarded, into project_urls, where setuptools actually reads it. README.rst also picks up the oceanum-iooceanum org rename.

Note on not installing the package

The docs job installs the runtime and docs requirements but not xarray-video itself. docs/conf.py already does sys.path.insert(0, os.path.abspath("..")), so autodoc imports the package from the source tree. Installing it is a trap: setup.py imports xarray_video to read __version__, so a PEP 517 isolated build fails on the missing numcodecs, and --no-build-isolation then fails on the missing setuptools in 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 — OK
  • sphinx-build -b html docs docs/_build/htmlexit 0, 22 HTML pages, 5 warnings (all pre-existing, see below)
  • autodoc output confirmed to contain real API content (H264, VideoDataset, VideoArray, open_video class pages)
  • no xarray-video.readthedocs reference remains in sources or built output
  • setup.py still executes; metadata now emits Project-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:

  1. language = None in docs/conf.py is invalid; Sphinx falls back to en.
  2. html_static_path entry _static does not exist.
  3. docs/xarray_video.codecs.rst autodocs xarray_video.codecs.mp4, a module that no longer exists.
  4. docs/modules.rst is not in any toctree.

The build is not run with -W, so these do not fail CI.

Follow-ups outside this PR

  • The repo homepage field still points at xarray-video.readthedocs.io; worth switching to the Pages URL once the first deploy is green.
  • The ReadTheDocs project itself is configured in RTD's web UI (there is no .readthedocs.yaml in the repo), so it needs to be archived or deleted there. Until then RTD builds will fail, because docs/requirements.txt no longer installs the package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sv6cKAFfxedP6NjhEYLTdE

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
ondave marked this pull request as ready for review July 10, 2026 05:56
@ondave
ondave merged commit 7446dc4 into main Jul 10, 2026
2 checks passed
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