1# .readthedocs.yaml
2# Read the Docs configuration file
3# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
5# Required
6version: 2
7
8# Set the version of Python and other tools you might need
9build:
10  os: ubuntu-20.04
11  tools:
12    python: "3.9"
13  jobs:
14    pre_build:
15    - ./scripts/apidoc_full.sh
16    - breathe-apidoc -o docs/api apidoc/xml
17    post_build:
18    - |
19      # Work around Readthedocs bug: Command parsing fails if the 'if' statement is on the first line
20      if [ "$READTHEDOCS_VERSION" = "development" ]; then
21        "$READTHEDOCS_VIRTUALENV_PATH/bin/rtd" projects "Mbed TLS API" redirects sync --wet-run -f docs/redirects.yaml
22      fi
23
24# Build documentation in the docs/ directory with Sphinx
25sphinx:
26  builder: dirhtml
27  configuration: docs/conf.py
28
29# Optionally declare the Python requirements required to build your docs
30python:
31  install:
32  - requirements: docs/requirements.txt
33