Read the Docs#
This template triggers a new documentation build on the Read the Docs platform via its REST API.
Usage#
In your project’s .gitlab-ci.yml:
include:
- project: "bytecode-solutions/core/core-gitlab-templates"
file: "releases/read_the_docs.yml"
Parameters#
imageThe Docker image used to run the trigger job. Default:
python:latestbranchThe branch on which the job should be executed. Default:
releasestageThe pipeline stage in which the job is executed. Default:
releaseproject_nameThe Read the Docs project slug.
versionThe documentation version to trigger. Default:
latest
Behavior#
The job performs the following steps:
Installs
Sphinxand the project theme (optional but common)Sends an authenticated POST request to the Read the Docs API to start a build
The job runs when the pipeline branch matches the configured branch input.
Environment Variables#
READ_THE_DOCS_TOKENA Read the Docs API token with permission to trigger builds.
Tip
You can generate a Read the Docs API token from your account settings. Store it as a masked GitLab CI variable for security.