Skip to content

Commit

Permalink
[Docs] Fix readthedocs for tag build (#6158)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-mo authored Jul 5, 2024
1 parent abad574 commit 79d406e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
# remove the warning banner if the version is a tagged release
header_file = os.path.join(os.path.dirname(__file__),
"_templates/sections/header.html")
os.remove(header_file)
# The file might be removed already if the build is triggered multiple times
# (readthedocs build both HTML and PDF versions separately)
if os.path.exists(header_file):
os.remove(header_file)

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down

0 comments on commit 79d406e

Please sign in to comment.