forked from JBjoernskov/Twin4Build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.readthedocs.yaml
38 lines (34 loc) · 1.2 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
36
37
38
# Read the Docs configuration file for Sphinx projects
# 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:
python: "3.9"
apt_packages:
- dos2unix
- graphviz
commands:
# Create output directory
# - mkdir -p _readthedocs/html
# Install Python packages
- pip install sphinx sphinx-rtd-theme sphinx-autodoc-typehints myst-parser
- pip install -e .
# Convert line endings and make scripts executable
- find . -type f -name "*.sh" -exec dos2unix {} \;
- find . -type f -name "*.sh" -exec chmod +x {} \;
# Build documentation
- /bin/bash -c "cd docs && rm -rf source/auto"
- /bin/bash -c "cd docs && sphinx-apidoc -f -o source/auto ../twin4build --maxdepth=1"
- /bin/bash -c "cd docs && python clean_sphinx_docs.py"
- /bin/bash -c "cd docs && make html"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Optional but recommended, declare the Python requirements required
# to build your documentation
python:
install:
- requirements: docs/requirements.txt