-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy path.readthedocs.yaml
More file actions
36 lines (33 loc) · 1.18 KB
/
.readthedocs.yaml
File metadata and controls
36 lines (33 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: 2
build:
os: ubuntu-24.04
tools:
python: '3.13'
jobs:
pre_create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
create_environment:
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
install:
- >
UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}"
uv sync --frozen --group docs --extra cpu
build:
html:
- mkdir -p "${READTHEDOCS_OUTPUT}/html/"
# Use Sphinx for legacy tags (v0.1.x) and MkDocs for current docs.
# Read the Docs sets READTHEDOCS_VERSION_TYPE to "tag" for tags,
# and READTHEDOCS_VERSION_NAME to the tag name (e.g. "v0.1.7").
- |
if [ "${READTHEDOCS_VERSION_TYPE:-}" = "tag" ] && \
echo "${READTHEDOCS_VERSION_NAME:-}" | grep -Eq '^v0\.1\.'; then
UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" \
uv run sphinx-build -b html docs/source "${READTHEDOCS_OUTPUT}/html"
else
UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" \
uv run mkdocs build --clean --site-dir "${READTHEDOCS_OUTPUT}/html"
fi
mkdocs:
configuration: mkdocs.yml