diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1509f72 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +os: +- linux +script: +- npm test +env: + global: + secure: RAEgFh9Ew0ePGJgrRU7WHuz2iUPc8GbrjW2tg5jsNvLawiswz1uO5CFF84vQtTVMgu4GDRM/JdH23FEfSfS705GlG1d4IsBDk27tVAbFDl9GTJejUkXRX6FY1tJovxp+EKX7ufEX3sjRwKeJXa14Fbxli4HMI0U6D1cgN6ddS84= +after_success: ./ghpages.sh diff --git a/ghpages.sh b/ghpages.sh new file mode 100755 index 0000000..7fd1026 --- /dev/null +++ b/ghpages.sh @@ -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 "zmp@umich.edu" +git commit -m "(docs-autogen) ${TRAVIS_REPO_SLUG}." +git push -fq "https://${TOKEN}:x-oauth-basic@github.com/zzmp/juliusjs.git" HEAD:gh-pages + +fi \ No newline at end of file