Build with build.jobs
This version is built with build.jobs.
It uses python -m sphinx -b linkcheck to check all the external links.
For example, that https://readthedocs.org/ resolves properly.
Note
The following text should be something different than { VERSION }: build-jobs-html
We are using sed to replace the version with the value of READTHEDOCS_VERSION_NAME.
1version: 2
2
3build:
4 os: ubuntu-22.04
5 jobs:
6 post_checkout:
7 - echo post_checkout
8 - echo `date`
9 # https://github.com/readthedocs/readthedocs.org/issues/8201#issuecomment-1018511443
10 # use ``|| true`` because it could be that --depth 50 is enough to not be
11 # shallowed and the command will fail with:
12 #
13 # fatal: --unshallow on a complete repository does not make sense
14 - git fetch --unshallow || true
15 pre_system_dependencies:
16 - echo pre_system_dependencies
17 - echo `date`
18 - |
19 # Test multi-line script
20 if test -n "A"; then echo "B"; fi
21 post_system_dependencies:
22 - echo post_system_dependencies
23 - echo `date`
24 pre_create_environment:
25 - echo pre_create_environment
26 - echo `date`
27 post_create_environment:
28 - echo post_create_environment
29 - echo `date`
30 pre_install:
31 - echo pre_install
32 - echo `date`
33 # https://github.com/readthedocs/readthedocs.org/issues/8201#issuecomment-1018511443
34 - git update-index --assume-unchanged docs/index.rst docs/conf.py
35 post_install:
36 - echo post_install
37 - echo `date`
38 pre_build:
39 - echo pre_build
40 - echo `date`
41 - python -m sphinx -b linkcheck docs/ _build/linkcheck
42 - sed **/*.rst --in-place --expression "s|{VERSION}|${READTHEDOCS_VERSION_NAME}|g"
43 build:
44 html:
45 - python -m sphinx -j auto -T -b html -d _build/doctrees -D language=en docs/ ${READTHEDOCS_OUTPUT}/html
46 post_build:
47 - echo post_build
48 - echo `date`
49 - echo $READTHEDOCS_OUTPUT
50 - find $READTHEDOCS_OUTPUT
51 tools:
52 python: "3"
53
54sphinx:
55 configuration: docs/conf.py
56
57python:
58 install:
59 - requirements: requirements.txt
Sphinx configuration file used to build this docs (see full file),
>>> # Build at
>>> import datetime
>>> datetime.datetime.utcnow() # UTC
datetime.datetime(2025, 11, 25, 18, 5, 49, 229669)