From a83bfc3183201e2e2a150ff178374cc60b0cf864 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Sun, 8 Jul 2018 08:01:42 +0800 Subject: [PATCH] no message Former-commit-id: c53919bdc656522ca81dc4499df46525aad3cefd --- deploy/preview.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 deploy/preview.sh diff --git a/deploy/preview.sh b/deploy/preview.sh new file mode 100755 index 0000000..ac67ed6 --- /dev/null +++ b/deploy/preview.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env sh + +# 确保脚本抛出遇到的错误 +set -e + +# 生成静态文件 +npm run build + +# 进入生成的文件夹 +cd dist + +# 如果是发布到自定义域名 +# echo 'www.example.com' > CNAME + +git init +git add -A +git commit -m 'deploy' + +# 如果发布到 https://.github.io +# git push -f git@github.com:/.github.io.git master + +# 如果发布到 https://.github.io/ +git push -f git@gitee.com:fairyever/d2-admin-start-kit-preview.git master + +cd - + +echo "publish to https://fairyever.gitee.io/d2-admin-start-kit-preview/#/index" \ No newline at end of file