Skip to content

docs: build the documentation as a check; Read the Docs hosts it - #29

Merged
mahdi-shafiei merged 1 commit into
mainfrom
docs/drop-gh-pages
Sep 30, 2026
Merged

mahdi-shafiei merged 1 commit into
mainfrom
docs/drop-gh-pages

Conversation

@mahdi-shafiei

Copy link
Copy Markdown
Collaborator

Summary

  • docs.yml becomes a build-only check: strict mkdocs build on pull requests and pushes to main (same paths filter), contents: read, no deploy step.
  • New contract test: no workflow uses a GitHub Pages deploy action or requests pages: write; docs.yml holds a read-only token and builds strictly on both events.

Why

The workflow deployed to gh-pages with cname: docs.avitai.bio on every push to main, but GitHub Pages is not enabled for the repository (Pages API 404), https://avitai.github.io/DiffBio returns 404 and docs.avitai.bio has no DNS records. Read the Docs builds and hosts the documentation from .readthedocs.yaml and is live.

The gh-pages branch is left in place; it is removed separately after merge.

Verification

  • New contract test: red on main (3 failures), green on this branch; the repository's other CI contract tests pass.
  • mkdocs build --strict --clean from a locked --extra docs environment: exit 0.
  • pre-commit run --all-files: exit 0.

docs.yml built the site and pushed it to gh-pages with peaceiris/actions-gh-pages and
cname: docs.avitai.bio. Every push to main deployed to a site that does not exist: the Pages
settings API returns 404 for the repository, https://avitai.github.io/DiffBio returns 404, and
docs.avitai.bio has no DNS records. Read the Docs builds and serves the documentation from
.readthedocs.yaml, and https://diffbio.readthedocs.io returns 200.

docs.yml now runs a strict mkdocs build on each pull request and each push to main that touches
the docs, mkdocs.yml, the package source or the workflow, with a contents: read token and no
deploy step. The concurrency group keeps cancel-in-progress: true, which tests/test_ci_concurrency.py requires of every workflow a push triggers.

A contract test holds it there: no workflow uses a GitHub Pages deploy action or requests
pages: write, docs.yml holds a read-only token, and it builds strictly on both events.
@mahdi-shafiei
mahdi-shafiei merged commit f8e9cc4 into main Sep 30, 2026
13 checks passed
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