Skip to content

Commit fecf4ff

Browse files
ci: migrate Read the Docs configuration to use uv
Migrates the Read the Docs build from pip to uv for faster and more reliable dependency installation. This follows the official Read the Docs documentation for uv integration. Changes: - Added pre_create_environment step to install uv via asdf - Added create_environment step to create venv with uv - Replaced pip install commands with 'uv sync --frozen --group docs' - Set UV_PROJECT_ENVIRONMENT to use Read the Docs virtualenv path Benefits: - Faster dependency resolution and installation - Better workspace support (handles vcs-versioning dependency correctly) - Respects uv.lock for reproducible builds with --frozen flag - Consistent with local development and CI workflows Reference: https://docs.readthedocs.com/platform/stable/build-customization.html#install-dependencies-with-uv
1 parent 3499d32 commit fecf4ff

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.readthedocs.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ version: 2
33
mkdocs:
44
configuration: mkdocs.yml
55

6-
76
build:
87
os: ubuntu-24.04
98
tools:
109
python: "3.13"
1110
jobs:
11+
pre_create_environment:
12+
- asdf plugin add uv
13+
- asdf install uv latest
14+
- asdf global uv latest
15+
create_environment:
16+
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
1217
install:
13-
- pip install -U pip # Official recommended way
14-
- pip install .
15-
- pip install --group docs
18+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group docs

0 commit comments

Comments
 (0)