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

We are using sed to replace the version with the value of READTHEDOCS_VERSION_NAME.


 1version: 2
 2
 3build:
 4  os: ubuntu-20.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    post_system_dependencies:
19      - echo post_system_dependencies
20      - echo `date`
21    pre_create_environment:
22      - echo pre_create_environment
23      - echo `date`
24    post_create_environment:
25      - echo post_create_environment
26      - echo `date`
27    pre_install:
28      - echo pre_install
29      - echo `date`
30      # https://github.com/readthedocs/readthedocs.org/issues/8201#issuecomment-1018511443
31      - git update-index --assume-unchanged docs/index.rst docs/conf.py
32    post_install:
33      - echo post_install
34      - echo `date`
35    pre_build:
36      - echo pre_build
37      - echo `date`
38      - python -m sphinx -b linkcheck docs/ _build/linkcheck
39      - sed **/*.rst --in-place --expression "s|{VERSION}|${READTHEDOCS_VERSION_NAME}|g"
40    post_build:
41      - echo post_build
42      - echo `date`
43  tools:
44    python: "3"
45
46sphinx:
47  configuration: docs/conf.py
48
49python:
50  install:
51    - requirements: requirements.txt

Sphinx configuration file used to build this docs (see full file),

 1# -*- coding: utf-8 -*-
 2
 3# Default settings
 4project = 'Test Builds'
 5extensions = [
 6    'sphinx_autorun',
 7]
 8
 9latex_engine = 'xelatex'  # allow us to build Unicode chars
10
11
12# Include all your settings here
13html_theme = 'sphinx_rtd_theme'
14
15
16
17

>>> # Build at
>>> import datetime
>>> datetime.datetime.utcnow()  # UTC
datetime.datetime(2022, 6, 21, 8, 56, 45, 925263)