Skip to content

Commit 109ca46

Browse files
authored
chore: update docs workflows to use 'uv' for dependency management (#33)
* chore: Update localization workflows to use 'uv' for dependency management * chore: refactor Read the Docs configuration to use uv
1 parent 961199c commit 109ca46

File tree

3 files changed

+26
-27
lines changed

3 files changed

+26
-27
lines changed

.github/workflows/docs-localization-download.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,26 @@ jobs:
1616
steps:
1717
- name: "Checkout Repository"
1818
uses: actions/checkout@v4
19-
with:
20-
fetch-tags: true
21-
- name: "Install Python"
19+
- name: "Setup Python"
2220
uses: actions/setup-python@v5
2321
with:
2422
python-version: "3.13"
25-
cache: "pip"
26-
cache-dependency-path: "requirements/_locale.txt"
27-
- name: "Install Dependencies"
28-
run: |
29-
python -m pip install --upgrade pip setuptools wheel
30-
pip install -r requirements/_locale.txt
31-
pip install .[speed,voice,docs]
23+
- name: "Install uv"
24+
uses: astral-sh/setup-uv@v6
25+
with:
26+
enable-cache: true
27+
- name: Sync dependencies
28+
run: uv sync --no-python-downloads --group dev --group docs --extra speed --extra voice
3229
- name: "Get locales"
30+
env:
31+
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build
3332
run: |
3433
make html
3534
sphinx-build -b gettext . ./build/locales
3635
working-directory: ./docs
3736
- name: "Build locales"
37+
env:
38+
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build
3839
run:
3940
sphinx-intl update -p ./build/locales ${{ vars.SPHINX_LANGUAGES }}
4041
working-directory: ./docs

.github/workflows/docs-localization-upload.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,26 @@ jobs:
2121
steps:
2222
- name: "Checkout Repository"
2323
uses: actions/checkout@v4
24-
with:
25-
fetch-tags: true
26-
- name: "Install Python"
24+
- name: "Setup Python"
2725
uses: actions/setup-python@v5
2826
with:
2927
python-version: "3.13"
30-
cache: "pip"
31-
cache-dependency-path: "requirements/_locale.txt"
32-
- name: "Install Dependencies"
33-
run: |
34-
python -m pip install --upgrade pip setuptools wheel
35-
pip install -r requirements/_locale.txt
36-
pip install .[speed,voice,docs]
28+
- name: "Install uv"
29+
uses: astral-sh/setup-uv@v6
30+
with:
31+
enable-cache: true
32+
- name: Sync dependencies
33+
run: uv sync --no-python-downloads --group dev --group docs --extra speed --extra voice
3734
- name: "Get locales"
35+
env:
36+
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build
3837
run: |
3938
make html
4039
sphinx-build -b gettext . ./build/locales
4140
working-directory: ./docs
4241
- name: "Build locales"
42+
env:
43+
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build
4344
run:
4445
sphinx-intl update -p ./build/locales ${{ vars.SPHINX_LANGUAGES }}
4546
working-directory: ./docs

.readthedocs.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@ build:
55
os: ubuntu-22.04
66
tools:
77
python: "3.13"
8+
jobs:
9+
post_install:
10+
- pip install uv
11+
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --all-extras --group docs --link-mode=copy
812

913
sphinx:
1014
configuration: docs/conf.py
1115
fail_on_warning: false
1216
builder: html
13-
14-
python:
15-
install:
16-
- method: pip
17-
path: .
18-
extra_requirements:
19-
- docs

0 commit comments

Comments
 (0)