Skip to content

docs: host the docs on Read the Docs #475

Closed

Description

@uniqueg

Summary

Host the documentation app (apps/documentation) on Read the Docs (RTD), with a preview for every pull request and a build for every branch. RTD replaces the Vercel previews and the Rahti deployment.

Why

  • Team-visible builds: build logs, settings and versions are visible to all maintainers in one place, not tied to one person's account.
  • Free and shared: RTD Community is free for open-source projects; maintainers share access through the RTD organization.
  • Used elsewhere in the org: other ELIXIR Cloud & AAI repositories already publish their docs on RTD, so the setup and know-how carry over.
  • Previews for fork pull requests: RTD builds pull requests from forks without a maintainer authorizing each deployment (Vercel asks a team member to authorize every external contributor's deployment). The docs build needs no secrets, so this is safe.
  • Per-branch builds: with an automation rule, every new branch gets its own version at /en/<branch>/.

What

  • Add .readthedocs.yaml: build the docs app (npx turbo run build --filter=ecc-docs...) and publish the static export.
  • RTD serves every version under a subpath (/en/latest/, /en/<branch>/, /en/<pr>/). When READTHEDOCS_CANONICAL_URL is set, derive Next's basePath from it, and make the hard-coded root paths in the docs (images, internal links, the hero button, the favicon) base-path aware. Builds without the variable (Docker image, Vercel) stay as they are.
  • Use the same Node.js major version as the docs image (build: move CI and Docker to Node.js 22 and 24 #466).

The change was tested on an RTD project for a fork: main builds, pull request previews, per-branch builds through an automation rule and the favicon all work.

Afterwards

  • Rahti will be switched off once RTD runs (maintainer decision).
  • Vercel can be retired once RTD runs.
  • Point the links to the old hosts (README, package READMEs, custom elements manifest) to the RTD URL once it is known.

Human steps (maintainers with RTD access)

  1. Import elixir-cloud-aai/cloud-components into RTD under the organization, via the GitHub App.
  2. Set the default branch to the repository's default branch (main).
  3. Enable Build pull requests and Show build overview in a comment.
  4. Add the automation rule "any branch → activate version". It only applies to branches created after the rule exists, so add it early and activate existing branches by hand.
  5. Keep the stable version inactive until a release tag contains .readthedocs.yaml.
  6. Add the maintainers to the RTD project.

The RTD check on pull requests only appears after the import.

Acceptance criteria

  • .readthedocs.yaml builds the docs on RTD within the Community limits.
  • The docs work under the RTD subpath: pages, images, favicon, internal links, navigation and live component demos.
  • Builds without READTHEDOCS_CANONICAL_URL produce the same site as before.
  • Pull requests get an RTD preview; new branches get a version through the automation rule (after the human steps above).

Activity

  1. added
    priority: medium
    status: in progress
    type: delivery
    type: docs
    workload: hours
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumstatus: in progresstype: deliverytype: docsworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions