Skip to content

Commit

Permalink
(feat) Autogen ghpages
Browse files Browse the repository at this point in the history
  • Loading branch information
zzmp committed Oct 15, 2014
1 parent d0e2ea7 commit 6a9c85c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
os:
- linux
script:
- npm test
env:
global:
secure: RAEgFh9Ew0ePGJgrRU7WHuz2iUPc8GbrjW2tg5jsNvLawiswz1uO5CFF84vQtTVMgu4GDRM/JdH23FEfSfS705GlG1d4IsBDk27tVAbFDl9GTJejUkXRX6FY1tJovxp+EKX7ufEX3sjRwKeJXa14Fbxli4HMI0U6D1cgN6ddS84=
after_success: ./ghpages.sh
22 changes: 22 additions & 0 deletions ghpages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is meant to be run by Travis to autogenerate the ghpages on commits to master
if [ "$TRAVIS_BRANCH" = 'master' ] && [ "$TRAVIS_PULL_REQUEST" = 'false' ]; then

# Remove build/test folders
rm -rf ./bin ./src ./js

# Remove packaging files
rm -f emscript.sh reemscript.sh ./bower.json ./package.json CONTRIBUTING.md

# Move dist to root
# As the examples grow more developed, this may need to be migrated (to Jekyll, &c.)
cp -fR ./dist/* ./
rm -rf ./dist

# Push the ghpages
git add --all
git config user.name "Zach Pomerantz"
git config user.email "[email protected]"
git commit -m "(docs-autogen) ${TRAVIS_REPO_SLUG}."
git push -fq "https://${TOKEN}:[email protected]/zzmp/juliusjs.git" HEAD:gh-pages

fi

0 comments on commit 6a9c85c

Please sign in to comment.