Migrate docs to Zensical and deploy via GitHub Actions - #81
Merged
Conversation
Replaces the Material for MkDocs setup with Zensical (the successor from the same team) and moves GitHub Pages publishing from the legacy `mkdocs gh-deploy` branch push to a first-party GitHub Actions Pages deployment. Addresses #73. Docs migration - Add zensical.toml (replacing mkdocs.yml) with equivalent nav, deep purple palette, light/dark toggle, and the markdown extensions the content uses (admonition, details, superfences, footnotes, highlight). - mkdocstrings still auto-generates the API reference; all 20 symbols render identically and cross-references resolve. - Swap the mkdocs-material dev dependency for zensical. - scripts/build now runs `zensical build --clean --strict`. Pages deployment - Add .github/workflows/docs.yml: build with Zensical and deploy to Pages via configure-pages / upload-pages-artifact / deploy-pages on push to main. Actions are SHA-pinned to match repo convention. - Drop `mkdocs gh-deploy --force` from scripts/publish; docs are no longer coupled to the release/tag flow. Verified locally: strict build clean, dev server serves all pages, rendered output matches the current site, 152 tests pass at 100% coverage, lint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #81 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 1460 1460
=========================================
Hits 1460 1460 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add `title: API` front matter to api.md so the page heading renders "API" rather than the filename-derived "Api" (Zensical uses page meta for the title; there is no H1 in the mkdocstrings-only page). - Add docs/stylesheets/extra.css to remove the body-link underline from links that wrap an image, so the home-page badge row renders cleanly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Match the previous behaviour where documentation was published as part of the release flow. The docs workflow now triggers on the same version tags as publish.yml (plus manual workflow_dispatch), rather than on every push to main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Switch the docs workflow from a tag-push trigger to workflow_run, gated on the "Publish" workflow completing successfully. This guarantees docs are only deployed after the PyPI release succeeds, rather than running in parallel with it. - Check out the released commit (workflow_run.head_sha) so the docs match the release rather than whatever the default branch currently points at. - Keep workflow_dispatch for manual/first-time deploys. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Migrates the documentation from Material for MkDocs to Zensical (the successor built by the same team) and modernizes GitHub Pages publishing to a first-party GitHub Actions deployment. Closes #73.
This also resolves the class of failure seen recently where the docs deploy failed with a generic "Deployment failed, try again later" — that came from GitHub's hidden legacy
pages-build-deploymentworkflow triggered by pushing to thegh-pagesbranch. The deploy now runs in our workflow, with visible logs and trivial re-runs.What changed
Docs → Zensical
zensical.toml(replacingmkdocs.yml) with equivalent nav, deep-purple palette, light/dark toggle, and the markdown extensions the content actually uses (admonition, details, superfences, footnotes, highlight).mkdocstringsstill auto-generates the API reference — all 20 API symbols render identically and cross-references resolve (the mkdocstrings-linking gap noted in httpx forks - is the library compatible? #73 is now supported in Zensical).mkdocs-materialdev dependency forzensical.scripts/buildnow runszensical build --clean --strict.title: APIfront matter so the API page heading reads "API";docs/stylesheets/extra.cssto drop the underline on the badge links.Pages → GitHub Actions (after a successful release)
.github/workflows/docs.yml: build with Zensical and deploy viaconfigure-pages/upload-pages-artifact/deploy-pages. Actions are SHA-pinned to match repo convention.workflow_runafter thePublishworkflow completes successfully (Publish runs on version tags and pushes to PyPI), so docs deploy only after a release actually succeeds — never in parallel with it. Manualworkflow_dispatchis kept for first-time/one-off deploys. The docs job checks out the released commit (workflow_run.head_sha) so the site matches the release.scripts/publish(droppedmkdocs gh-deploy --force). There was no separate "old Pages workflow" file: the previous deploy pushed the built site to thegh-pagesbranch, and GitHub's implicitpages-build-deploymentran off the legacy "deploy from branch" source. Switching the Pages source to GitHub Actions (below) retires that implicit workflow.Functional equivalence
No degradation — verified by diffing rendered output against the current Material build and rendering pages in a browser:
objects.invinventoryLocal checks: strict build clean, dev server (
zensical serve) serves all pages, 152 tests pass at 100% coverage, lint clean.workflow_runonly fires oncedocs.ymlis on the default branch, so the release-triggered deploy activates after this PR merges.actions/configure-pageswithenablement: true, which should switch the Pages source from thegh-pagesbranch to GitHub Actions on the first run. If it doesn't, set Settings → Pages → Build and deployment → Source → GitHub Actions once. The oldgh-pagesbranch can be deleted afterward.workflow_dispatch).Note (out of scope)
Issue #73 also suggests moving off
httpxtohttpxyz. That changes the library's runtime dependency (not just docs) and the thread concluded it's premature — deliberately left out of this PR.🤖 Generated with Claude Code