Skip to content


Configure a job to automatically configure a Sphinx documentation project using sphinx-apidoc and then build it with sphinx-build.


  - component:<VERSION>
      stage: build


Input Default value Description
stage test The pipeline stage to add jobs to
python "python" Name/path of Python interpreter to use
job_name "sphinx" Name to give the build job
image python Container image in which to build the documentation
builder "html" Sphinx builder to use
module_dir None Path of module(s) to document
requirements "" Extra packages to install (with pip) before building
sphinx_sourcedir "_sphinx" Path of directory in which to create sphinx sources
sphinx_options "" Extra options to pass to sphinx-build
sphinx_outputdir "sphinx" Sphinx build output directory
exclude " tests examples" fnmatch-style file and/or directory patterns to exclude from generation
pages_when "never" When to automatically publish the documentation using Gitlab Pages, one of "tags" (for all git tags), "default" (pushes to the project default branch), or "never! (don't publish anything)