Created
March 2, 2017 16:21
-
-
Save sparkida/16bc2145936effc06845d4c869d8454b to your computer and use it in GitHub Desktop.
build github pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
currentBranch="`git branch | while read line; do if [[ "$line" =~ ^\* ]]; then echo ${line:2}; fi; done`" | |
if [ -d docs ]; then | |
rm -rf docs | |
fi | |
./node_modules/.bin/jsdoc -c jsdoc.json | |
git stash | |
git checkout gh-pages | |
mv -f ./docs/*.html . | |
rm -rf docs | |
git commit -am 'updated docs' | |
git push origin gh-pages | |
git checkout "$currentBranch" | |
git stash pop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment