Skip to content

Commit

Permalink
ci: Use uv to generate docs in Read the Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Feb 16, 2025
1 parent 544b72f commit 4671cd3
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@ build:
os: 'ubuntu-22.04'
tools:
python: '3.11'

# Build documentation in the doc/ directory with Sphinx
sphinx:
configuration: doc/conf.py
builder: dirhtml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- doc
commands:
- pip install uv
- uv venv
- uv pip install '.[doc]'
- uv run --no-sync sphinx-build -b dirhtml doc $READTHEDOCS_OUTPUT/html
- uv run --no-sync sphinx-build -b epub doc $READTHEDOCS_OUTPUT/epub
- find $READTHEDOCS_OUTPUT/epub -mindepth 1 ! -name '*.epub' -exec rm -rf {} +
- uv run --no-sync sphinx-build -b latex doc $READTHEDOCS_OUTPUT/pdf
- make -C $READTHEDOCS_OUTPUT/pdf
- find $READTHEDOCS_OUTPUT/pdf -mindepth 1 ! -name '*.pdf' -exec rm -rf {} +

0 comments on commit 4671cd3

Please sign in to comment.