From f3b97d319ce9ff52f1af17f1f0afb834a566f0bd Mon Sep 17 00:00:00 2001 From: zhouliujun <1096432931@qq.com> Date: Thu, 14 Jan 2021 16:02:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0gh-pages=E7=9A=84=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gh-page.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gh-page.sh diff --git a/gh-page.sh b/gh-page.sh new file mode 100644 index 0000000..37a84b7 --- /dev/null +++ b/gh-page.sh @@ -0,0 +1,23 @@ +echo "打包 => dist"; + +npm run build; + +echo "更新gh-pages"; + +git branch -D gh-pages; + +echo "删除gh-pages"; + +git checkout -b gh-pages; + +echo "创建并切换到gh-pages"; + +git add -f dist; + +git commit -m 'create gh-pages'; + +git push origin -d gh-pages; + +git subtree push --prefix dist origin gh-pages; + +echo "已推送gh-pages"; \ No newline at end of file