From 36d12de8294c9abd2ca94fac6e07f5e019ae0de2 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Thu, 29 May 2025 10:34:57 +0100 Subject: [PATCH] Attempt to fix readthedocs by delegating build to `just` --- .readthedocs.yaml | 7 ++++--- docs/justfile | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8313b4b..e04a3ad 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,9 +10,10 @@ build: - asdf plugin add poetry - asdf install poetry latest - asdf global poetry latest + - asdf plugin add just + - asdf install poetry just + - asdf global poetry just create_environment: - - poetry lock - poetry install --with dev,docs - - poetry run maturin develop install: - - export PATH="$PATH:$HOME/.asdf/installs/rust/1.86.0/bin" && cargo install sphinx-rustdocgen && poetry run sphinx-build -b html docs $READTHEDOCS_OUTPUT/html + - PATH="$PATH:$HOME/.asdf/installs/rust/1.86.0/bin" just html_out $READTHEDOCS_OUTPUT diff --git a/docs/justfile b/docs/justfile index aca634c..ce24105 100644 --- a/docs/justfile +++ b/docs/justfile @@ -35,6 +35,9 @@ html sphinxbuild=_sphinxbuild sourcedir=_sourcedir builddir=_builddir sphinxopts @echo @echo "Build finished. The HTML pages are in {{builddir}}/html." +# Build HTML for with a specific out directory +html_out builddir=_builddir: (html _sphinxbuild _sourcedir builddir _sphinxopts) + # Build and serve documentation locally serve sphinxbuild=_sphinxbuild sourcedir=_sourcedir builddir=_builddir sphinxopts=_sphinxopts: (html sphinxbuild sourcedir builddir sphinxopts) @echo "Serving documentation at http://localhost:8000"