mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Replace Netlify with Read the Docs build previews (#103843)
Co-authored-by: Oleg Iarygin <dralife@yandex.ru> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
This commit is contained in:
parent
4b10ecc29f
commit
accb417c33
5 changed files with 51 additions and 21 deletions
11
Doc/conf.py
11
Doc/conf.py
|
@ -114,12 +114,13 @@ if any('htmlhelp' in arg for arg in sys.argv):
|
|||
# Short title used e.g. for <title> HTML tags.
|
||||
html_short_title = '%s Documentation' % release
|
||||
|
||||
# Deployment preview information, from Netlify
|
||||
# (See netlify.toml and https://docs.netlify.com/configure-builds/environment-variables/#git-metadata)
|
||||
# Deployment preview information
|
||||
# (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html)
|
||||
repository_url = os.getenv("READTHEDOCS_GIT_CLONE_URL")
|
||||
html_context = {
|
||||
"is_deployment_preview": os.getenv("IS_DEPLOYMENT_PREVIEW"),
|
||||
"repository_url": os.getenv("REPOSITORY_URL"),
|
||||
"pr_id": os.getenv("REVIEW_ID")
|
||||
"is_deployment_preview": os.getenv("READTHEDOCS_VERSION_TYPE") == "external",
|
||||
"repository_url": repository_url.removesuffix(".git") if repository_url else None,
|
||||
"pr_id": os.getenv("READTHEDOCS_VERSION")
|
||||
}
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue