From 370f30acdbd599e4183a018e714408c73d98b467 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Tue, 24 Sep 2024 21:17:49 -0700 Subject: [PATCH 1/2] add RTD config --- .readthedocs.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..e3ffa0b --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,25 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + rust: latest + commands: + # install cargo-binstall + - >- + curl + -L --proto '=https' --tlsv1.2 -sSf + https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh + | bash + # install mdbook and mdbook-alerts + - cargo binstall -y mdbook mdbook-alerts + # build docs + - mdbook build docs + # move HTML output to required RTD output path + - mkdir -p ${READTHEDOCS_OUTPUT} + - mv docs/book/html/ "${READTHEDOCS_OUTPUT}" From 0d47788b63771ab01edf7f30c002424c363fad22 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Tue, 24 Sep 2024 21:33:09 -0700 Subject: [PATCH 2/2] set path accordingly fix install path --- .readthedocs.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e3ffa0b..ffda996 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -16,10 +16,13 @@ build: -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash + # add .cargo bin to PATH # install mdbook and mdbook-alerts - - cargo binstall -y mdbook mdbook-alerts # build docs - - mdbook build docs + - >- + PATH=/home/docs/.cargo/bin:$PATH && + cargo binstall --install-path /home/docs/.cargo/bin -y mdbook mdbook-alerts && + mdbook build docs # move HTML output to required RTD output path - mkdir -p ${READTHEDOCS_OUTPUT} - mv docs/book/html/ "${READTHEDOCS_OUTPUT}"