Environment variablesο
All build processes have the following environment variables automatically defined and available for each build step:
- READTHEDOCSο
Whether the build is running inside Read the Docs.
- Default:
True
- READTHEDOCS_LANGUAGEο
The locale name, or the identifier for the locale, for the project being built. This value comes from the projectβs configured language.
- Examples:
en
,it
,de_AT
,es
,pt_BR
- READTHEDOCS_VERSIONο
The slug of the version being built, such as
latest
,stable
, or a branch name likefeature-1234
. For pull request builds, the value will be the pull request number.
- READTHEDOCS_VERSION_NAMEο
The verbose name of the version being built, such as
latest
,stable
, or a branch name likefeature/1234
.
- READTHEDOCS_VERSION_TYPEο
The type of the version being built.
- Values:
branch
,tag
,external
(for pull request builds), orunknown
- READTHEDOCS_VIRTUALENV_PATHο
Path for the virtualenv that was created for this build. Only exists for builds using Virtualenv and not Conda.
- Example:
/home/docs/checkouts/readthedocs.org/user_builds/project/envs/version
See also
- Understanding environment variables
General information about how environment variables are used in the build process.
- How to use custom environment variables
Learn how to define your own custom environment variables, in addition to the pre-defined ones.