deploy.sh 486 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env sh
  2. # 发生错误时终止
  3. set -e
  4. # 构建
  5. npm run build:docs
  6. # 进入构建文件夹
  7. cd docs
  8. # 如果你要部署到自定义域名
  9. # echo 'www.example.com' > CNAME
  10. git init
  11. git add -A
  12. git commit -m 'deploy'
  13. # 如果你要部署在 https://<USERNAME>.github.io
  14. # git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git main
  15. # 如果你要部署在 https://<USERNAME>.github.io/<REPO>
  16. git push -f git@github.com:wangibook/my-baseui.git master:gh-pages
  17. cd -