From b49438a819758306ef1dbd62a087fd82997422d8 Mon Sep 17 00:00:00 2001 From: Griatch Date: Mon, 12 Jan 2026 17:40:31 +0100 Subject: [PATCH] Adding better exit statement for deploying docs with mismatched commits --- docs/deploy.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/deploy.py b/docs/deploy.py index 7514d3a7a..22123d2e1 100644 --- a/docs/deploy.py +++ b/docs/deploy.py @@ -44,8 +44,20 @@ def deploy(): os.system("git fetch") os.system("git checkout gh-pages") + proc = subprocess.Popen( + ["git", "checkout gh-pages"], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + stdin=subprocess.PIPE, + shell=True, + ) + if proc.returncode: + print("Could not checkout gh-pages branch.") + sys.exit(1) + else: + print("Checked out gh-pages branch.") + os.system("pwd") - os.system("ls") names_to_skip = legacy_versions + ["build"]