2018-07-17 14:33:33 +08:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
|
|
# 确保脚本抛出遇到的错误
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
# 生成静态文件
|
|
|
|
|
npm run doc:build
|
|
|
|
|
|
|
|
|
|
# 进入生成的文件夹
|
|
|
|
|
cd docs/.vuepress/dist
|
|
|
|
|
|
|
|
|
|
git init
|
|
|
|
|
git add -A
|
|
|
|
|
git commit -m 'deploy'
|
|
|
|
|
|
|
|
|
|
# 如果发布到 https://<USERNAME>.github.io
|
|
|
|
|
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
|
|
|
|
|
|
|
|
|
|
# 如果发布到 https://<USERNAME>.github.io/<REPO>
|
|
|
|
|
# git push -f git@github.com:FairyEver/d2-admin.git master:gh-pages
|
|
|
|
|
git push -f git@gitee.com:fairyever/d2-admin-doc.git master
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
|
|
2018-08-23 08:37:46 +08:00
|
|
|
# echo "publish to http://app.d3collection.cn/d2-admin-doc/lastest/zh/"
|