forked from readthedocs/addons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.readthedocs.yaml
35 lines (27 loc) · 1 KB
/
.readthedocs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3"
nodejs: "18"
commands:
# Generate the documentation
- pip install -r docs/requirements.txt
- sphinx-build -b html docs/ $READTHEDOCS_OUTPUT/html
# Bundle the current version
- npm install -g npm@latest
- npm install
- npm run build
# Create directory to serve the examples
- mkdir --parents $READTHEDOCS_OUTPUT/html/examples
# Copy our client into the output
- cp --verbose dist/readthedocs-client.js $READTHEDOCS_OUTPUT/html/examples
# Copy all the example sites (Sphinx and Pelican) into the output
- cp --recursive --verbose public/* $READTHEDOCS_OUTPUT/html/examples/
# Copy a JSON file that acts as the response of the API
- cp --verbose public/_/readthedocs-config.json $READTHEDOCS_OUTPUT/html/examples
# Show all the files served by Read the Docs
- find $READTHEDOCS_OUTPUT/html
# Inject our Javascript file :)
- cat docs/.inject-js.sh
- bash docs/.inject-js.sh