Skip to content

Commit 22192c8

Browse files
committed
Docs: build.jobs reference documentation
Small reference documentation for `build.jobs` and all the pre/post jobs allowed.
1 parent 3456634 commit 22192c8

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

docs/user/config-file/v2.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,42 @@ We don't currently support PPA's or other custom repositories.
418418
When possible avoid installing Python packages using apt (``python3-numpy`` for example),
419419
:ref:`use pip or Conda instead <guides/reproducible-builds:pinning dependencies>`.
420420

421+
422+
build.jobs
423+
``````````
424+
425+
Commands to be run before or after a Read the Docs pre-defined job.
426+
This allows you to run custom commands at a particular moment in the build process.
427+
428+
429+
.. code-block:: yaml
430+
431+
version: 2
432+
433+
build:
434+
os: ubuntu-22.04
435+
tools:
436+
python: "3.10"
437+
jobs:
438+
pre_create_environment:
439+
- echo "Command run at 'pre_create_environment' step"
440+
post_build:
441+
- echo "Command run at 'post_build' step"
442+
- echo `date`
443+
444+
.. note::
445+
446+
Each key under ``build.jobs`` must be a list of strings.
447+
448+
449+
:Type: ``dict``
450+
:Allowed keys: ``post_checkout``, ``pre_system_dependencies``, ``post_system_dependencies``,
451+
``pre_create_environment``, ``post_create_environment``, ``pre_install``, ``post_install``,
452+
``pre_build``, ``post_build``
453+
:Required: ``false``
454+
:Default: ``{}``
455+
456+
421457
sphinx
422458
~~~~~~
423459

0 commit comments

Comments
 (0)