-
Notifications
You must be signed in to change notification settings - Fork 27
/
.readthedocs.yaml
44 lines (38 loc) · 1.68 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
39
40
41
42
43
# .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/sphinx/source/conf.py
# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf
- epub
build:
os: ubuntu-22.04
tools:
python: "3.10"
commands:
- pip install --upgrade strictdoc
- strictdoc export . --output $READTHEDOCS_OUTPUT/
# This is what Read the Docs does by default to generate Sphinx.
# Some modifications were made because the paths were not resolved for some reason.
- python -m virtualenv $READTHEDOCS_VIRTUALENV_PATH
- python -m pip install --upgrade --no-cache-dir pip setuptools
- python -m pip install --upgrade --no-cache-dir sphinx
- python -m pip install --exists-action=w --no-cache-dir -r docs/sphinx/requirements.txt
# HTML
- SPHINXOPTS="-W --keep-going" python -m sphinx -T -b html -d _build/doctrees -D language=en docs/sphinx/source/ $READTHEDOCS_OUTPUT/html/sphinx
# PDF
- python -m sphinx -T -b latex -d _build/doctrees -D language=en docs/sphinx/source/ build/pdf/
- cat build/pdf/latexmkrc
- mkdir $READTHEDOCS_OUTPUT/pdf
- cd build/pdf/ && latexmk -r latexmkrc -pdf -f -dvi- -ps- -jobname=strictdoc -interaction=nonstopmode && mv strictdoc.pdf $READTHEDOCS_OUTPUT/pdf/
# EPUB
- mkdir $READTHEDOCS_OUTPUT/epub
- python -m sphinx -T -b epub -d _build/doctrees -D language=en docs/sphinx/source/ build/epub/ && cp build/epub/StrictDoc.epub $READTHEDOCS_OUTPUT/epub/
python:
install:
- requirements: docs/sphinx/requirements.txt