From 3593da7f8e4c204dc8119ede98dedf64653702c1 Mon Sep 17 00:00:00 2001 From: zhouliujun <1096432931@qq.com> Date: Mon, 21 Jun 2021 17:11:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pages.sh diff --git a/pages.sh b/pages.sh new file mode 100644 index 0000000..4b650c0 --- /dev/null +++ b/pages.sh @@ -0,0 +1,25 @@ +echo "打包 => dist"; + +# 打包 => dist +npm run build; + +# 更新gh-pages +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