From c31f0c502808848bb343646c5e78795b9d5a17ee Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 25 Oct 2024 12:10:00 +0800 Subject: chore: improve scripts for gh-pages --- scripts/gh-pages.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/gh-pages.sh b/scripts/gh-pages.sh index a091820..02b5d08 100755 --- a/scripts/gh-pages.sh +++ b/scripts/gh-pages.sh @@ -1,9 +1,11 @@ #!/bin/bash +origin_branch=`git branch --show-current` + git checkout gh-pages -- .gitignore index.html && \ npm run build && npm run docs && \ git branch --force gh-pages HEAD && \ git checkout gh-pages && \ git add --all && git commit -m gh-pages && \ git push -f && -git checkout HEAD^ +git checkout $origin_branch -- cgit v1.2.3-70-g09d2