Skip to content

Commit 59259a5

Browse files
committed
Make a doc directory if it doesn't exist
1 parent 542ea7c commit 59259a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

support/mkdocs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ if len(args) > 0:
6363
'--branch', 'master'], cwd=site_dir, env=env)
6464
if ret != 0 or version == 'dev':
6565
sys.exit(ret)
66-
redirect_page_path = os.path.join(site_dir, version, 'api.html')
66+
current_doc_path = os.path.join(site_dir, version)
67+
os.makedirs(current_doc_path, exist_ok=True)
68+
redirect_page_path = os.path.join(current_doc_path, 'api.html')
6769
with open(redirect_page_path, "w") as file:
6870
file.write(redirect_page)
6971
ret = call(['git', 'add', redirect_page_path], cwd=site_dir)

0 commit comments

Comments
 (0)