一键部署到 github

144 阅读1分钟

项目根目录下新建 deploy.sh 文件,文件内容如下。 进入根目录,运行 sh deploy.sh

rm -rf dist &&
yarn build &&
cd dist &&
git init &&
git add . &&
git commit -m "update" &&
git branch -M master &&
git remote add origin git仓库地址
git push -f -u origin master &&
cd -
echo https://shenjingwa444.github.io/pixiu-ui/index.html#/  这是github pages 的地址