sh gh-pages.sh
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh gh-pages.sh相关的知识,希望对你有一定的参考价值。
'#!/bin/bash'
echo 'checkout master'
git checkout master
echo 'pull origin master'
git pull origin master
echo '>> rm -rf node_modules'
rm -rf node_modules
echo '>> npm install'
npm install
echo '>> git checkout gh-pages'
git checkout gh-pages
echo '>> git merge --no-edit --no-ff origin/master'
git merge --no-edit --no-ff origin/master
echo '>> npm run build'
npm run build
echo '>> git add -A'
git add -A
echo '>> git commit -m "Update from master at $(git rev-parse --short master)"'
git commit -m "Update from master at $(git rev-parse --short master)"
echo '>> npm test'
npm test
echo '>> git push origin gh-pages'
git push origin gh-pages
echo '>> git checkout -'
git checkout -
echo 'deployed to gh-pages'
以上是关于sh gh-pages.sh的主要内容,如果未能解决你的问题,请参考以下文章