Pin your Read the Docs build environment with .readthedocs.yaml
Use .readthedocs.yaml to pin Python, dependencies, and the Sphinx builder so Read the Docs builds match your local output.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use .readthedocs.yaml to pin Python, dependencies, and the Sphinx builder so Read the Docs builds match your local output.
The goal is to confirm whether a locally hosted Read the Docs server built with Docker Compose reproduces the same build environment as the cloud service when processing a project's .readthedocs.yaml file. Local services include web, worker, database, and Redis, but image tags and dependency versions may drift from the hosted infrastructure. Build environmen
Integration boundary A repository's readthedocs.yaml (config version 2) and Read the Docs' build fleet form the primary integration boundary for documentation builds. The build.os and build.tools.python keys explicitly select the container image (Ubuntu release) and Python interpreter, but both are optional. Unresolved behavior When these keys are omitted, R
Read the Docs reads .readthedocs.yaml from the checkout of the version being built, so a v2 config that pins build.os and the matching Python interpreter applies only to refs that actually contain that file. Release tags created before the config was added have none, so their builds resolve the image and interpreter from project-level defaults instead. What
Goal: choose a single source of truth for build configuration so that Python version and install steps are applied consistently, while still allowing immediate adjustments without a commit. Read the Docs supports declarative configuration via readthedocs.yaml in the repository and imperative configuration through the project admin UI. The YAML file is versio