Skip to content

Build and deploy docs on release#26

Merged
wmwolf merged 1 commit into
masterfrom
docs-ci
Jun 25, 2026
Merged

Build and deploy docs on release#26
wmwolf merged 1 commit into
masterfrom
docs-ci

Conversation

@wmwolf

@wmwolf wmwolf commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Problem

The Sphinx docs under docs/ are not regenerated automatically — there's no docs workflow, and GitHub Pages just serves the committed HTML. That HTML is a static 2017 snapshot (last built in d11dd4c), so the published docs are missing years of features (.mod model reading, the file_type param, pickle support, etc.). They don't reflect current docstrings.

Fix

Add a docs workflow that rebuilds the docs from docstrings (sphinx.ext.autodoc) and deploys to GitHub Pages on release publication — the same trigger as the existing PyPI publish workflow — so the docs track each released version rather than churning on every push. Manual workflow_dispatch is also supported for an on-demand rebuild.

  • requirements-docs.txt pins the doc toolchain (sphinx, sphinx_rtd_theme, sphinx-copybutton).
  • The build command (sphinx-build -b html docs_source _site) was verified locally — builds cleanly and reflects current docstrings.

⚠️ Required one-time setup

This uses actions/deploy-pages, so the repo's Pages source must be switched from "Deploy from a branch" (/docs) to "GitHub Actions" under Settings → Pages. Until that's flipped, the deploy job will fail. (I can do this via gh api if you'd like — just say so.)

Follow-ups (not in this PR)

  • Once Pages deploys from Actions, the committed docs/ HTML becomes vestigial and could be removed from the repo.
  • The version/release in docs_source/conf.py (3.5.0) is stale vs setup.py (0.3.5) and could be wired to the package version.

🤖 Generated with Claude Code

The Sphinx docs under docs/ were never regenerated automatically; they
are a static 2017 snapshot served by GitHub Pages. Add a docs workflow
that rebuilds the docs from docstrings (sphinx autodoc) and deploys them
to Pages on release publication (mirroring the PyPI publish trigger), so
the published docs track each release. Also supports manual dispatch.

Adds requirements-docs.txt pinning the doc toolchain (sphinx,
sphinx_rtd_theme, sphinx-copybutton).

NOTE: requires the repo's Pages source to be set to "GitHub Actions"
(Settings -> Pages) instead of "Deploy from a branch", since this uses
actions/deploy-pages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wmwolf wmwolf merged commit 19690a6 into master Jun 25, 2026
2 checks passed
@wmwolf wmwolf deleted the docs-ci branch June 25, 2026 22:04
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