From a2ccda4cb773e3c5c4af9121f3d3ee0596132cb3 Mon Sep 17 00:00:00 2001 From: Abrynos <6608231+Abrynos@users.noreply.github.com> Date: Sun, 9 Jun 2024 20:20:24 +0200 Subject: [PATCH] Bulletproof ci.py --- ci.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci.py b/ci.py index b60d48d..e738002 100644 --- a/ci.py +++ b/ci.py @@ -81,7 +81,10 @@ def add_configuration(board : str): add_configuration(port) os.chdir(BASE_DIR) -shutil.copytree("./out", "./_site/out") +out_dir = "./_site/out" +if os.path.exists(out_dir): + shutil.rmtree(out_dir) +shutil.copytree("./out", out_dir) with open("./_site/OTA.json", "w") as f: json.dump({"Configurations": configurations}, f)