#!/usr/bin/env sh # 参考文档 https://vuepress.vuejs.org/zh/guide/deploy.html#github-pages # 确保脚本抛出遇到的错误 set -e # 生成静态文件 npm run build # 进入生成的文件夹 cd dist # 如果是发布到自定义域名 # echo 'www.example.com' > CNAME git init git config user.name "Ken Huang" git config user.email "kenhuang.au@gmail.com" git add -A git commit -m 'deploy' # 如果发布到 https://.github.io git push -f git@github.com:kenberkeley/kenberkeley.github.io.git master # 如果发布到 https://.github.io/ # git push -f git@github.com:/.git master:gh-pages cd -