aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-25 12:10:00 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-25 12:10:00 +0800
commitc31f0c502808848bb343646c5e78795b9d5a17ee (patch)
treea8e08307a3f1a7703b64465c82b9a42829237da4 /scripts
parentd806d43647094fdd15bdf67166f6ace8fac15620 (diff)
chore: improve scripts for gh-pages
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gh-pages.sh4
1 files changed, 3 insertions, 1 deletions
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 @@
1#!/bin/bash 1#!/bin/bash
2 2
3origin_branch=`git branch --show-current`
4
3git checkout gh-pages -- .gitignore index.html && \ 5git checkout gh-pages -- .gitignore index.html && \
4npm run build && npm run docs && \ 6npm run build && npm run docs && \
5git branch --force gh-pages HEAD && \ 7git branch --force gh-pages HEAD && \
6git checkout gh-pages && \ 8git checkout gh-pages && \
7git add --all && git commit -m gh-pages && \ 9git add --all && git commit -m gh-pages && \
8git push -f && 10git push -f &&
9git checkout HEAD^ 11git checkout $origin_branch