Skip to content

Commit

Permalink
fixed HTML pages destination folder not being version specific
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelcdevin committed Oct 17, 2024
1 parent 8ea2da9 commit 433ca14
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docs/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,15 @@ def build_doc(version, tag, home_branch, build):
f"git checkout {home_branch}", shell=True)


def move_pages():
print(f"Moving HTML pages to {os.path.join(docs_dir, 'pages')}...")
shutil.copytree(html_dir, os.path.join(docs_dir, 'pages'))
def move_pages(dest_dir=None):
if dest_dir is None:
print(f"Moving HTML pages to {os.path.join(docs_dir, 'pages')}...")
shutil.copytree(
html_dir, os.path.join(docs_dir, 'pages'))
else:
print(f"Moving HTML pages to {os.path.join(docs_dir, 'pages', dest_dir)}...")
shutil.copytree(
html_dir, os.path.join(docs_dir, 'pages', dest_dir))
print('Done.')


Expand All @@ -101,5 +107,5 @@ def move_pages():
for name, tag in versions.items():
if name != home_name:
build_doc(name, tag, home_branch, build)
move_pages()
move_pages(dest_dir=name)
shutil.rmtree(html_dir)

0 comments on commit 433ca14

Please sign in to comment.