Skip to content

Commit 8819e08

Browse files
chore: use native readthedocs uv integration (#783)
* chore: use native readthedocs uv integration Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * Update {{cookiecutter.project_name}}/.readthedocs.yaml * style: pre-commit fixes --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c9b940e commit 8819e08

2 files changed

Lines changed: 32 additions & 14 deletions

File tree

docs/pages/guides/docs.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -502,14 +502,17 @@ version: 2
502502
build:
503503
os: ubuntu-24.04
504504
tools:
505-
python: "3.13"
506-
commands:
507-
- asdf plugin add uv
508-
- asdf install uv latest
509-
- asdf global uv latest
510-
- uv sync --group docs
511-
- uv run python -m sphinx -T -b html -d docs/_build/doctrees -D language=en
512-
docs $READTHEDOCS_OUTPUT/html
505+
python: "3.14"
506+
507+
sphinx:
508+
configuration: docs/conf.py
509+
510+
python:
511+
install:
512+
- method: uv
513+
command: sync
514+
groups:
515+
- docs
513516
```
514517
<!-- prettier-ignore-end -->
515518
<!-- [[[end]]] -->
@@ -530,7 +533,8 @@ version: 2
530533
build:
531534
os: ubuntu-24.04
532535
tools:
533-
python: "3.13"
536+
python: "3.14"
537+
534538
commands:
535539
- asdf plugin add uv
536540
- asdf install uv latest

{{cookiecutter.project_name}}/.readthedocs.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,33 @@ version: 2
66
build:
77
os: ubuntu-24.04
88
tools:
9-
python: "3.13"
9+
python: "3.14"
10+
11+
{%- if cookiecutter.docs == 'sphinx' %}
12+
13+
sphinx:
14+
configuration: docs/conf.py
15+
16+
python:
17+
install:
18+
- method: uv
19+
command: sync
20+
groups:
21+
- docs
22+
23+
{%- else %}
24+
1025
commands:
1126
- asdf plugin add uv
1227
- asdf install uv latest
1328
- asdf global uv latest
1429
- uv sync --group docs
15-
{%- if cookiecutter.docs == 'sphinx' %}
16-
- uv run python -m sphinx -T -b html -d docs/_build/doctrees -D language=en
17-
docs $READTHEDOCS_OUTPUT/html
18-
{%- elif cookiecutter.docs == 'mkdocs' %}
30+
{%- if cookiecutter.docs == 'mkdocs' %}
1931
- uv run mkdocs build --site-dir $READTHEDOCS_OUTPUT/html
2032
{%- elif cookiecutter.docs == 'zensical' %}
2133
- uv run zensical build
2234
- mkdir -p $READTHEDOCS_OUTPUT/html/
2335
- cp --recursive site/* $READTHEDOCS_OUTPUT/html/
2436
{%- endif %}
37+
38+
{%- endif %}

0 commit comments

Comments
 (0)