Skip to content

ci: build the docs like the product docs - #69

Merged
uniqueg merged 2 commits into
mainfrom
ci/docs-like-product-docs
Nov 1, 2026
Merged

uniqueg merged 2 commits into
mainfrom
ci/docs-like-product-docs

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Builds the hub like the product docs (cloud-registry, proTES): MkDocs Material, Read the Docs config, strict build in CI under the CI passed gate.

  • .readthedocs.yaml as in the product docs (Python 3.13, fail_on_warning: true, docs extra).
  • pyproject.toml: PEP 621 metadata and a docs extra with bounded mkdocs, mkdocs-material and pymdown-extensions; Poetry and poetry.lock are gone (unused mkdocs-i18n, Pillow and CairoSVG dropped, as no plugin needs them). Makefile and README follow.
  • mkdocs.yml: palette (deep purple, light/dark toggle), features, Markdown extensions and validation as in the product docs; site name "ELIXIR On-Cloud docs"; "ELIXIR On-Cloud" in the copyright and social links (website link now https://elixir-on.cloud/); site_url from READTHEDOCS_CANONICAL_URL, falling back to the GitHub Pages URL for now. The hub-specific navigation tabs and the cookie consent stay.
  • Logo: the "ELIXIR On-Cloud" logo of the product docs replaces the old logo on the start page (the page text is untouched); the old logo files are removed.
  • ci.yml (CI): jobs PR title, Docs (mkdocs build --strict) and the gate CI passed, with the org's shared actions pinned to 743e82d (v1.0.0), on pull requests and pushes to main. The old ci.yml only ran mkdocs gh-deploy on pushes; it is dropped because GitHub Pages is built from deploy.yml (Pages source: workflow), which stays unchanged, so the current deployment keeps working until ci: serve the hub at docs.elixir-on.cloud #67.
  • Strict build findings fixed: the pull request template page was not in the nav (now not_in_nav, it stays linked); the removed custom_theme/ was a stale unused build output.

Closes #62

Part of #61.

Verification

  • mkdocs build --strict locally in a fresh venv (pip install -e ".[docs]", Python 3.12): passes with no warnings.
  • CI: PR title, Docs and CI passed pass on this PR.

Lane

Light lane: only docs configuration and CI (a new workflow without secrets, with read-only permissions and permissions: {} on the jobs); no release workflow, no logic. Reviewed the diff myself; no reviewer subagents.

Declined review findings

None.

Open questions / for the maintainer

The merge doesn't depend on these. The Read the Docs project must be created by a maintainer:

  1. On https://app.readthedocs.org/dashboard/import/ choose "Import a repository" and select elixir-cloud-aai/elixir-cloud-aai.github.io (connect the GitHub account of the org's Read the Docs organization if needed). Name it elixir-on-cloud-docs (or similar); default branch main. The build reads .readthedocs.yaml, so no further build settings are needed.
  2. Admin > Settings > "Build pull requests for this project": on, so every PR gets a preview (the GitHub status check "docs/readthedocs.org:..." appears on PRs; add it to the ruleset only if wanted; CI passed already covers the strict build).
  3. Admin > Advanced settings: check that the default version is latest (branch main) and that "Privacy level" and "Build pull requests" match the product docs' projects.
  4. Later (ci: serve the hub at docs.elixir-on.cloud #67): Admin > Domains > add docs.elixir-on.cloud, create the CNAME DNS record RTD shows, wait for the certificate, then make it canonical. Until then GitHub Pages stays as is.

🤖 Generated with Claude Code

Summary by Sourcery

Align the documentation build, branding, and CI checks with the ELIXIR On-Cloud product documentation setup.

New Features:

  • Add Read the Docs configuration and align the site with the ELIXIR On-Cloud product documentation theme and branding.

Bug Fixes:

  • Enable strict documentation validation and address warnings from omitted navigation files and stale build output.

Enhancements:

  • Migrate project metadata and documentation dependencies from Poetry to PEP 621 with a dedicated docs extra.
  • Update local documentation commands and deployment dependency installation to use the shared documentation setup.

CI:

  • Replace the previous deployment-oriented CI workflow with pull request title validation, strict documentation builds, and a required CI gate on pushes to main and pull requests.

Deployment:

  • Update the GitHub Pages deployment environment to Python 3.13 and install the repository's documentation extra while preserving the existing deployment workflow.

Documentation:

  • Refresh the README and site configuration to identify the project as ELIXIR On-Cloud docs and use the product logo and website links.

Chores:

  • Remove obsolete Poetry lockfiles, unused documentation assets, and the stale custom theme output.

Align the MkDocs setup with cloud-registry and proTES: Read the
Docs config with a strict build, docs extra in pyproject.toml (instead
of Poetry), Material palette, features and Markdown extensions, the
ELIXIR On-Cloud logo and site name, and a CI workflow with a PR title
check, a strict docs build and the CI passed gate.

The GitHub Pages deployment (deploy.yml) stays; the redundant
gh-pages deployment of the old ci.yml is dropped.

Closes #62

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

The PR standardizes documentation builds on MkDocs Material with PEP 621 metadata, a bounded docs extra, and Read the Docs configuration; it adds a strict, least-privilege CI workflow with a required CI passed gate, updates product branding/configuration, and leaves GitHub Pages deployment unchanged.

Sequence diagram for the CI documentation gate

sequenceDiagram
    participant GitHub
    participant CI as GitHub Actions CI
    participant Docs as Docs job
    participant Gate as CI passed

    GitHub->>CI: pull_request or push to main
    CI->>Docs: checkout repository
    Docs->>Docs: pip install -e ".[docs]"
    Docs->>Docs: mkdocs build --strict
    Docs-->>CI: Docs result
    CI->>Gate: needs: [title, docs]
    Gate->>Gate: gate(needs)
    Gate-->>GitHub: required check result
Loading

File-Level Changes

Change Details Files
Replaces the deployment-only CI workflow with a strict documentation validation workflow and a required aggregate gate.
  • Runs PR title validation on pull requests with the shared action pinned to a release commit.
  • Installs the docs extra under Python 3.13 and runs mkdocs build --strict on pull requests and pushes to main.
  • Adds the CI passed gate with explicit handling for intentionally skipped title checks and least-privilege job permissions.
  • Preserves GitHub Pages deployment in deploy.yml while removing deployment behavior from this workflow.
.github/workflows/ci.yml
Aligns local and Read the Docs builds around a pip-installable PEP 621 project and a bounded documentation dependency extra.
  • Adds Read the Docs v2 configuration using Python 3.13, the docs extra, and fail-on-warning builds.
  • Migrates project metadata and build configuration from Poetry to setuptools/PEP 621.
  • Defines bounded versions for MkDocs, Material, and pymdown-extensions, and removes the Poetry lockfile and unused documentation dependencies.
  • Updates Makefile commands and README text for pip-based strict documentation builds.
.readthedocs.yaml
pyproject.toml
Makefile
README.md
poetry.lock
Updates MkDocs Material configuration to match the product documentation while retaining hub-specific navigation and consent behavior.
  • Adds the product-style theme palette, navigation/code/search features, Markdown extensions, and link/file validation settings.
  • Updates site identity, metadata, social links, copyright, repository information, and environment-driven Read the Docs site_url fallback.
  • Marks the linked pull request template as intentionally outside navigation to satisfy strict validation.
mkdocs.yml
Refreshes branding assets and the landing-page logo without changing the page's substantive text.
  • Replaces the old start-page logo and link with the ELIXIR On-Cloud product logo and website.
  • Removes obsolete logo files and the unused custom 404 theme output.
docs/index.md
docs/images/logo_elixir_on_cloud.png
docs/images/logo.256px.png
docs/images/logo.32px.png
custom_theme/404.html

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@uniqueg
uniqueg marked this pull request as ready for review November 1, 2026 16:47

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 3 issues

Fixed security issues:

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/workflows/ci.yml" line_range="11" />
<code_context>
-    branches:
-      - main
+    branches: [main]
+  pull_request:
+    branches: [main]
+
</code_context>
<issue_to_address>
**Stale PR title check**

When a pull request title changes after the workflow has run, the workflow does not rerun because `pull_request` omits the `edited` activity type, so `PR title` retains its old result: a corrected title stays failed, while a newly invalid title can still pass into the squash commit.

Add the `edited` activity type to the `pull_request` trigger.
</issue_to_address>

### Comment 2
<location path="pyproject.toml" line_range="23-26" />
<code_context>
+# are listed too, to bound their major versions (new warnings of minor
+# releases still fail it)
+docs = [
+    "mkdocs>=1.6.1,<2",
+    "mkdocs-material>=9.7.7,<10",
+    "pymdown-extensions>=12.3,<13",
+]

-[build-system]
</code_context>
<issue_to_address>
**Pages deploy ignores dependency bounds**

When an incompatible MkDocs or Material major version is published and selected by the Pages workflow, the Pages workflow installs MkDocs and Material directly rather than installing the `docs` extra, so it ignores these version bounds; when an incompatible major release is selected, the production build fails even though CI and Read the Docs use the bounded dependencies.

Have the Pages workflow install the bounded `.[docs]` extra instead of resolving MkDocs and Material independently.
</issue_to_address>

### Comment 3
<location path="README.md" line_range="3" />
<code_context>
+# ELIXIR On-Cloud docs

-Documentation for the ELIXIR-on-Cloud project.
+Documentation of the ELIXIR On-Cloud federated deployment, hosted by Read the Docs.

 ## Development
</code_context>
<issue_to_address>
**Readers are sent to an unavailable host**

When the Read the Docs project has not yet been created, the README says the documentation is hosted by Read the Docs, but that project has not been imported; readers are directed to a host that does not serve the documentation while GitHub Pages remains live.

Update the README to identify the currently available GitHub Pages host instead of Read the Docs.
</issue_to_address>

Linked issues

#62 ci: build and host like the product docs · 4 of 6 met · 2 to check by hand

# Requirement Status Notes
1 Add the Read the Docs configuration and project with PR previews. 👀 Check by hand (external system) Confirm that a maintainer has created the Read the Docs project, connected this repository, and enabled pull-request previews; the PR description says this setup remains to be done.
2 Build with mkdocs build --strict in CI under the CI passed gate. ✅ Met The Docs job runs the strict build, and CI passed requires its result.
3 Align MkDocs theme features, palette, logo, plugins, and Markdown extensions with the product docs. ✅ Met The configuration adds the light/dark palette, Material features and Markdown extensions, retains the search plugin, and uses the new ELIXIR On-Cloud logo on the home page.
4 Pin the documentation dependencies in pyproject.toml. ✅ Met The docs extra bounds the versions of MkDocs, MkDocs Material, and pymdown-extensions.
5 Fix the warnings reported by the strict build, including broken links and missing pages. ✅ Met The PR marks the linked pull-request template as not_in_nav, configures warning validation, and reports that the strict build passes without warnings.
6 Make the site look like the product docs. 👀 Check by hand (visual) Compare the rendered site with the product docs to confirm the theme, branding, and navigation look as intended.

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: .github/workflows/ci.yml:11, pyproject.toml:26, README.md:3


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread .github/workflows/ci.yml Resolved
Comment thread pyproject.toml Resolved
Comment thread README.md Resolved
Rerun the PR title check when the title is edited, install the bounded docs extra in the Pages deployment, and name the current host in the README.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

@uniqueg
uniqueg merged commit 467d16a into main Nov 1, 2026
5 of 7 checks passed
@uniqueg
uniqueg deleted the ci/docs-like-product-docs branch November 1, 2026 19:05
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.

ci: build and host like the product docs

1 participant