deploy.sh 350 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env sh
  2. # 当发生错误时中止脚本
  3. set -e
  4. # 构建
  5. npm run build
  6. # cd 到构建输出的目录下
  7. cd dist
  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:HongqingCao/GitDataV.git master:gh-pages
  15. cd -