From da26acf6f92c048c51f05107b1569bad4f9b6fdd Mon Sep 17 00:00:00 2001 From: Colin Wu <85907102+ColinWu0403@users.noreply.github.com> Date: Thu, 18 Jul 2024 03:22:02 -0400 Subject: [PATCH] Update static.yml --- .github/workflows/static.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 82036d7..f0ff7d1 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -66,7 +66,12 @@ jobs: fi # Checkout or create gh-pages branch - git fetch origin gh-pages || git checkout --orphan gh-pages + if git ls-remote --exit-code --heads origin gh-pages; then + git fetch origin gh-pages + git checkout gh-pages + else + git checkout --orphan gh-pages + fi # Add all files git add .