Skip to content

Commit e578554

Browse files
committed
Docs: reference for build.commands
1 parent 88e942f commit e578554

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/user/config-file/v2.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,41 @@ See :doc:`/build-customization` for more details.
456456
:Default: ``{}``
457457

458458

459+
build.commands
460+
``````````````
461+
462+
Specify a list of commands that Read the Docs will run on the build process.
463+
When ``build.commands`` is used, none of the :term:`pre-defined build jobs` will be executed.
464+
(see :doc:`/build-customization` for more details).
465+
This allows you to run custom commands and control the build process completely.
466+
The ``output/`` directory (relative to the checkout's path) will be uploaded and hosted by Read the Docs.
467+
468+
.. warning::
469+
470+
This feature is in a *beta phase* and can suffer incompatible changes or even removed completely in the near feature.
471+
Use it under your own responsibility.
472+
473+
.. code-block:: yaml
474+
475+
version: 2
476+
477+
build:
478+
os: ubuntu-22.04
479+
tools:
480+
python: "3.10"
481+
commands:
482+
- pip install pelican
483+
- pelican --settings docs/pelicanconf.py --output output/ docs/
484+
485+
.. note::
486+
487+
``build.os`` and ``build.tools`` are also required when using ``build.commands``.
488+
489+
:Type: ``list``
490+
:Required: ``false``
491+
:Default: ``[]``
492+
493+
459494
sphinx
460495
~~~~~~
461496

0 commit comments

Comments
 (0)