Former-commit-id: 63d4c74420f4e16b9719d95f7349373d8597680d Former-commit-id: 9ee3a27368fc164974ddba713c91137ae000acc7 Former-commit-id: 496dd5c86890b71a07c6ac79c0a0f0cee0ae612b
25 lines
524 B
Bash
Executable File
25 lines
524 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
# 确保脚本抛出遇到的错误
|
|
set -e
|
|
|
|
# 生成静态文件
|
|
npm run doc:build
|
|
|
|
# 进入生成的文件夹
|
|
cd docs/.vuepress/dist
|
|
|
|
# 如果是发布到自定义域名
|
|
# echo 'www.example.com' > CNAME
|
|
|
|
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/d2admin-vue-element.git master:gh-pages
|
|
|
|
cd - |