docs: migrate from Read the Docs to GitHub Actions + Pages#112
Merged
Conversation
Mirror the modern-di docs deployment pattern: GitHub Actions builds and force-pushes to gh-pages on push to main, served under lite-bootstrap.modern-python.org via CNAME. Tears down Read the Docs config in the same PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Maps the design spec to 8 bite-sized tasks plus pre-flight: Justfile recipe, mkdocs site_url, CNAME, pyproject docs URL, workflow, .readthedocs.yaml removal, integration verification, and PR open with operator follow-up checklist. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the modern-di pattern; intended to be invoked from CI on push to main. Local invocation force-pushes from the current checkout, so the recipe carries an inline warning about stale checkouts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
site_url is required for canonical URLs in <head>, sitemap.xml, and any Material theme feature that needs an absolute base URL. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GitHub Pages reads this from the gh-pages branch root to bind the custom subdomain. mkdocs copies it into the built site automatically. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PyPI renders this as the 'Documentation' link on the project page. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Builds the mkdocs site and force-pushes to gh-pages on push to main when docs files change. Mirrors modern-di's pattern: paths filter, deploy concurrency group, contents: write permission, fetch-depth: 0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Docs now deploy via GitHub Actions to gh-pages. RTD project will be archived on readthedocs.io after the new site is verified live. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the CNAME and pyproject.toml docs URL added earlier in the branch. Found during Task 6 cleanup; the spec missed README references. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This was referenced Jun 9, 2026
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
gh-pageson push tomain.gh-pagesunderlite-bootstrap.modern-python.org(docs/CNAME).README.mdandpyproject.tomlURLs to point at the new domain.modern-diproject's docs deployment pattern verbatim (workflow file is byte-identical).Spec:
planning/specs/2026-06-09-mkdocs-github-actions-design.mdPlan:
planning/plans/2026-06-09-mkdocs-github-actions-plan.mdFiles changed
.github/workflows/docs.ymlJustfiledocs-deployrecipemkdocs.ymlsite_urldocs/CNAMEpyproject.tomldocsURL to[project.urls].readthedocs.yamlREADME.mdOperator follow-ups (post-merge)
These actions happen outside the repo and must be performed in order after merging:
modern-python.orgzone, add a CNAME record:lite-bootstrap→modern-python.github.io. (Same as the existingmodern-di.modern-python.orgrecord.)gh-pagesbranch.gh-pages/(root). Custom domain auto-populates from CNAME.gh repo edit modern-python/lite-bootstrap --homepage https://lite-bootstrap.modern-python.orgTest plan
mainworkflow runs lint + pytest as today; docs workflow does not run on PRs by design).Deploy Docsworkflow runs green on the merge commit.gh-pagesbranch is created and contains the built site +CNAME.Local verification done
just lint-ci— pass (eof-fixer, ruff format, ruff check, ty check).just test— pass (194/194, 100% coverage).uvx --with-requirements docs/requirements.txt mkdocs build --strict— pass; CNAME copied into site, sitemap contains canonical hostname.🤖 Generated with Claude Code