Skip to content

Commit ed6b6b2

Browse files
committed
prevent index overwrite
1 parent 81fdc0e commit ed6b6b2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

deployment/installtutorials.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ def process_repo(repo, destination_directory):
6363
destination_directory,
6464
)
6565
if len(tutorials) > 1:
66-
print("More than 1 tutorial found; also copying index.html")
67-
shutil.copy(f"{repo}/index.html", destination_directory)
66+
index = glob.glob(f"{repo}/index-*.html")[0]
67+
print(f"More than 1 tutorial found; also copying index file {index}")
68+
shutil.copy(index, destination_directory)
6869
# copy images (plots) in notebook for faster page loading
6970
try:
7071
shutil.copy(f"{repo}/_images/*.png", f"{destination_directory}/nboutput")

0 commit comments

Comments
 (0)