mogo-h5plus/docs/deploy.sh
2020-04-21 13:29:13 +08:00

27 lines
534 B
Bash
Executable File

#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
# set -e
# 生成静态文件
# npm run docs:build
vuepress build
# 进入生成的文件夹
cd .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 https://github.com/tyaqing/mogo-h5plus.git master:gh-pages
cd -