Skip to content

Commit

Permalink
CI: Use uv on RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Feb 7, 2025
1 parent cdafb87 commit 724cbc5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
26 changes: 20 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,36 @@ version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3.12"
python: "3.13"
apt_packages:
- plantuml

# Bundle assets, because `pip install --editable=.` does not do it.
jobs:

# Install `uv`.
# https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv
create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv venv

# Install dependencies using `uv`.
install:
- uv pip install -r docs/requirements.txt

# Bundle assets, because `pip install --editable=.` does not do it.
pre_build:
- make bundle-develop
- cd docs; make bundle-assets

# Invoke the build also using `uv`.
build:
html:
- uv run sphinx-build -T -b html docs $READTHEDOCS_OUTPUT/html

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true

python:
install:
- requirements: docs/requirements.txt
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Install the local crate-docs-theme package by specifying parent directory,
# because `pip` is run from there.
# Install the `crate-docs-theme` package from the local working tree
# in editable mode. `pip` is invoked from the root directory.
--editable=.

0 comments on commit 724cbc5

Please sign in to comment.