diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8d761885..e526ec65 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,25 +1,34 @@ +# .readthedocs.yaml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details -# Required version: 2 -# Set the OS, Python version, and other tools you might need build: os: ubuntu-24.04 tools: python: "3.11" + jobs: - post_create_environment: - # Install poetry - - python -m pip install poetry==1.8.3 - post_install: - # Install dependencies - - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs + # 1️⃣ Install uv once before we create the virtual-env + pre_create_environment: + - | + # Install uv via the official installer with curl + curl -Ls https://astral.sh/uv/install.sh | bash + + # 2️⃣ Create the virtual-env with uv + create_environment: + - ~/.local/bin/uv venv "${READTHEDOCS_VIRTUALENV_PATH}" + + # 3️⃣ Sync docs dependencies (uses uv.lock if present) + install: + - | + UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" \ + ~/.local/bin/uv sync --frozen --group docs # Build documentation in the "docs/" directory with Sphinx sphinx: - configuration: docs/conf.py + configuration: docs/conf.py formats: - pdf