Skip to content

Commit f7e1ba3

Browse files
fix(template): read branch name from RTD env (#86)
Fixes #85. Co-authored-by: Michael Park <michael.park@canonical.com>
1 parent 3742ed2 commit f7e1ba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

canonical_sphinx/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,6 @@ def config_inited(app: Sphinx, config: Config) -> None: # noqa: PLR0915, PLR091
255255
# Skip PR builds because ReadTheDocs can't read the target branch from
256256
# GitHub actions
257257
if os.environ["READTHEDOCS_VERSION_TYPE"] != "external":
258-
branch = os.environ["READTHEDOCS_VERSION_NAME"]
258+
branch = os.environ["READTHEDOCS_GIT_IDENTIFIER"]
259259

260260
html_context["build_branch"] = branch

0 commit comments

Comments
 (0)