Skip to content

Commit 9b890f5

Browse files
authored
[doc] Use the latest tag for triggering RTD build. (dmlc#11240)
1 parent de0f675 commit 9b890f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ops/pipeline/trigger-rtd-impl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ def trigger_build(token: str) -> None:
2626
else:
2727
branch = event["pull_request"]["number"]
2828

29+
if branch == "master":
30+
# Use the `latest` tag, otherwise RTD wouldn't update the rendered doc.
31+
branch = "latest"
32+
2933
URL = f"https://readthedocs.org/api/v3/projects/xgboost/versions/{branch}/builds/"
3034
HEADERS = {"Authorization": f"token {token}"}
3135
response = requests.post(URL, headers=HEADERS)

0 commit comments

Comments
 (0)