Skip to content

docs: migrate from Read the Docs to GitHub Actions + Pages#112

Merged
lesnik512 merged 9 commits into
mainfrom
docs/migrate-to-github-actions
Jun 9, 2026
Merged

docs: migrate from Read the Docs to GitHub Actions + Pages#112
lesnik512 merged 9 commits into
mainfrom
docs/migrate-to-github-actions

Conversation

@lesnik512

@lesnik512 lesnik512 commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Replaces Read the Docs with a GitHub Actions workflow that force-pushes the built site to gh-pages on push to main.
  • GitHub Pages serves gh-pages under lite-bootstrap.modern-python.org (docs/CNAME).
  • Updates README.md and pyproject.toml URLs to point at the new domain.
  • Mirrors the sibling modern-di project's docs deployment pattern verbatim (workflow file is byte-identical).

Spec: planning/specs/2026-06-09-mkdocs-github-actions-design.md
Plan: planning/plans/2026-06-09-mkdocs-github-actions-plan.md

Files changed

File Change
.github/workflows/docs.yml new — push-to-main + workflow_dispatch, paths-filtered
Justfile append docs-deploy recipe
mkdocs.yml add site_url
docs/CNAME new — custom domain
pyproject.toml add docs URL to [project.urls]
.readthedocs.yaml delete
README.md 6 RTD links → new domain

Operator follow-ups (post-merge)

These actions happen outside the repo and must be performed in order after merging:

  1. DNS — on the modern-python.org zone, add a CNAME record: lite-bootstrapmodern-python.github.io. (Same as the existing modern-di.modern-python.org record.)
  2. Trigger first deploy — let the merge commit trigger it (it touches docs files) or dispatch manually via Actions → Deploy Docs → Run workflow. First run creates the gh-pages branch.
  3. Enable GitHub Pages — repo Settings → Pages → Source: 'Deploy from a branch' → gh-pages / (root). Custom domain auto-populates from CNAME.
  4. Update repo homepagegh repo edit modern-python/lite-bootstrap --homepage https://lite-bootstrap.modern-python.org
  5. Archive RTD project — on readthedocs.io dashboard, mark the project archived once the new site is verified live.

Test plan

  • CI green on PR (main workflow runs lint + pytest as today; docs workflow does not run on PRs by design).
  • After merge: Deploy Docs workflow runs green on the merge commit.
  • gh-pages branch is created and contains the built site + CNAME.
  • After DNS + Pages enablement: https://lite-bootstrap.modern-python.org serves the site.
  • PyPI 'Documentation' link points to the new domain on the next release.

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

lesnik512 and others added 9 commits June 9, 2026 13:59
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

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lesnik512 lesnik512 merged commit 5daeed5 into main Jun 9, 2026
8 of 9 checks passed
@lesnik512 lesnik512 deleted the docs/migrate-to-github-actions branch June 9, 2026 11:25
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