Skip to content

Migrate documentation hosting to custom domain - #412

Merged
corydolphin merged 5 commits into
mainfrom
claude/bold-clarke-WRWsi
Jun 8, 2026
Merged

Migrate documentation hosting to custom domain#412
corydolphin merged 5 commits into
mainfrom
claude/bold-clarke-WRWsi

Conversation

@corydolphin

Copy link
Copy Markdown
Owner

Summary

This PR migrates the Flask-Cors documentation from Read the Docs to a custom domain (flask-cors.corydolphin.com) hosted via GitHub Pages, with automatic deployment on every push to main.

Key Changes

  • GitHub Pages Deployment: Added a new deploy-docs job in main.yml that automatically builds and deploys documentation to GitHub Pages on every push to the main branch

    • Gated behind the check-docs job to prevent deploying broken builds
    • Uses mkdocs gh-deploy for deployment
    • Configured with concurrency controls to prevent race conditions
  • Removed Read the Docs Configuration:

    • Deleted .readthedocs.yaml configuration file
    • Removed deploy-docs job from on-release-main.yml (no longer needed for release-based deployments)
  • Custom Domain Setup:

    • Added docs/CNAME file pointing to flask-cors.corydolphin.com
    • Updated mkdocs.yml to use the custom domain as site_url
  • Documentation Links: Updated all documentation links in README.rst to point to the new custom domain instead of Read the Docs URLs

Implementation Details

The new deployment workflow:

  • Only triggers on pushes to main (not on pull requests)
  • Requires write permissions to push the built docs to the gh-pages branch
  • Uses the same Python environment setup as the documentation build check
  • Includes concurrency group to serialize deployments and prevent conflicts

https://claude.ai/code/session_015oRdhsSvfayv8tPqGkSsqv

claude added 5 commits June 7, 2026 21:11
The docs were migrated to MkDocs (mkdocs.yml + docs/*.md), but
.readthedocs.yaml still configured a Sphinx build pointing at the
no-longer-existent docs/conf.py and docs/requirements.txt. That made the
RTD build fail, so the root URL redirect to /en/main/ returned a 404.

Point Read the Docs at mkdocs.yml, install the package so mkdocstrings
can import flask_cors, and add docs/requirements.txt with the MkDocs
dependencies.

Fixes #403
Scaffold a modern docs site under website/ using Astro Starlight, as an
alternative to the MkDocs/Read the Docs setup:

- Landing page, getting-started, hand-written API reference for CORS and
  cross_origin, and example pages ported from the existing docs.
- GitHub Actions workflow to build and deploy to GitHub Pages on push to
  main. Defaults to the project Pages URL; astro.config.mjs documents how to
  switch to a custom domain.

Lives alongside the existing docs/ so nothing is removed yet pending a
decision on cutover.
Point the MkDocs site at the custom subdomain:
- Add docs/CNAME so the custom domain survives 'mkdocs gh-deploy --force'
  (which rewrites the gh-pages branch on every release).
- Set site_url to https://flask-cors.corydolphin.com so canonical URLs and
  the sitemap reference the custom domain, deduplicating the old github.io
  and readthedocs.io copies for SEO.

Remove the Astro Starlight scaffold and its Pages workflow: staying on the
existing MkDocs + gh-deploy setup (recoverable from history if revisited).
Complete the migration off Read the Docs onto GitHub Pages:
- Delete .readthedocs.yaml and docs/requirements.txt. The GitHub Pages
  deploy (mkdocs gh-deploy) and the check-docs CI job both run via
  'uv run mkdocs', pulling the mkdocs toolchain from the dev dependency
  group in pyproject.toml, so the pip requirements file was redundant
  duplication kept alive only for RTD's builder.
- Repoint the documentation links in README.rst from readthedocs.io to
  https://flask-cors.corydolphin.com.
Docs previously only deployed via the deploy-docs job in the release
workflow, so the published site reflected the last released version and
went stale between releases. Move deployment to a deploy-docs job in
main.yml that runs on every push to main (gated behind check-docs, never
on PRs), and drop the now-redundant deploy-docs job from the release
workflow. The docs site now tracks main.
@corydolphin
corydolphin marked this pull request as ready for review June 8, 2026 22:13
@corydolphin
corydolphin merged commit ad4f355 into main Jun 8, 2026
15 checks passed
@corydolphin
corydolphin deleted the claude/bold-clarke-WRWsi branch June 8, 2026 22:13
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.

2 participants