Skip to content

Commit 4f6d221

Browse files
authored
add ReadTheDocs config (#45)
used for PR previews of doc changes
1 parent 0f1a348 commit 4f6d221

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.readthedocs.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
rust: latest
12+
commands:
13+
# install cargo-binstall
14+
- >-
15+
curl
16+
-L --proto '=https' --tlsv1.2 -sSf
17+
https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh
18+
| bash
19+
# add .cargo bin to PATH
20+
# install mdbook and mdbook-alerts
21+
# build docs
22+
- >-
23+
PATH=/home/docs/.cargo/bin:$PATH &&
24+
cargo binstall --install-path /home/docs/.cargo/bin -y mdbook mdbook-alerts &&
25+
mdbook build docs
26+
# move HTML output to required RTD output path
27+
- mkdir -p ${READTHEDOCS_OUTPUT}
28+
- mv docs/book/html/ "${READTHEDOCS_OUTPUT}"

0 commit comments

Comments
 (0)