diff --git a/deploy.sh b/deploy-doc.sh similarity index 100% rename from deploy.sh rename to deploy-doc.sh diff --git a/deploy-preview.sh b/deploy-preview.sh new file mode 100755 index 00000000..310ee2ce --- /dev/null +++ b/deploy-preview.sh @@ -0,0 +1,25 @@ +#!/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-preview.git master + +cd - \ No newline at end of file