Use uv to manage docs Python dependencies

UV's use of a lockfile makes building the docs more reliable, and it installs the dependencies faster too (though in CI that's largely hidden by having to install Doxygen every time).
This commit is contained in:
Oliver Hamlet
2025-05-12 17:21:58 +01:00
parent 0e58606e30
commit c6747a85c8
7 changed files with 400 additions and 18 deletions
+11 -4
View File
@@ -101,10 +101,14 @@ jobs:
- name: Install packages for building docs
shell: bash
run: pip3 install --user -r docs/requirements.txt
working-directory: docs
run: |
pipx install uv
uv sync
- name: Build docs
run: sphinx-build -b html docs build/docs/html
working-directory: docs
run: uv run -- sphinx-build -b html . ../build/docs/html
- name: Build archive
id: build-archive
@@ -214,10 +218,13 @@ jobs:
echo "${{ github.workspace }}\doxygen-1.13.2.windows.x64.bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
python -m pip install -r docs/requirements.txt
pipx install uv
cd docs
uv sync
- name: Build docs
run: sphinx-build -b html docs build\docs\html
working-directory: docs
run: uv run -- sphinx-build -b html . ../build/docs/html
- name: Build archive
id: build-archive
+5 -2
View File
@@ -105,10 +105,13 @@ jobs:
echo "${{ github.workspace }}\doxygen-1.13.2.windows.x64.bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
python -m pip install -r docs/requirements.txt
pipx install uv
cd docs
uv sync
- name: Build docs
run: sphinx-build -b html docs build\docs\html
working-directory: docs
run: uv run -- sphinx-build -b html . ../build/docs/html
- name: Build archive
id: build-archive