-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy path.readthedocs.yml
35 lines (28 loc) · 1.31 KB
/
.readthedocs.yml
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
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
builder: html
fail_on_warning: false
build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"
jobs:
pre_install:
- LATEST_TAG=$(git describe --tags --abbrev=0) ; echo Downloading $LATEST_TAG ;
wget https://github.com/tudat-team/tudatpy/archive/refs/tags/$LATEST_TAG.zip; unzip $LATEST_TAG.zip; rm -rf docs/; LT=$(echo $LATEST_TAG | cut -c 2-); mv tudatpy-$LT/docs/ .
# The pre-install step enables building the docs on the latest tag
# instead of the latest commit. Since Read the Docs uses the latest
# tudatpy dev conda package to find the binaries (see docs/source/conf.
# py) and extract docs form them, it must use the corresponding source
# code to build the docs to avoid any inconsistencies. The pre-install
# step overrides the default behavior of Read the Docs to build the docs
# on the latest commit. The pre-install step replaces the docs/
# directory with the docs/ directory of the latest tag.
conda:
environment: docs/environment_readthedocs.yaml