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-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 post_build:
44 - echo post_build
45 - echo `date`
46 - echo $READTHEDOCS_OUTPUT
47 - find $READTHEDOCS_OUTPUT
48 tools:
49 python: "3"
50
51sphinx:
52 configuration: docs/conf.py
53
54python:
55 install:
56 - 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(2023, 3, 28, 15, 48, 34, 860005)