Skip to content

Commit

Permalink
Add mkdocs deployment to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Oct 17, 2015
1 parent 429ab79 commit ec9c00e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

install:
- sudo apt-get install git; git --version
- pip install coveralls scrutinizer-ocular
- pip install coveralls scrutinizer-ocular mkdocs

before_script:
- make env
Expand All @@ -30,6 +30,24 @@ after_success:
- coveralls
- ocular

after_script: >
echo $TRAVIS_BRANCH; echo $TRAVIS_PULL_REQUEST;
if [[ $TRAVIS_BRANCH == 'develop' && $TRAVIS_PULL_REQUEST == 'false' ]]; then
# Generate site
mkdocs build ;
# Configure Git with Travis CI information
git config --global user.email "travis@travis-ci.org" ;
git config --global user.name "travis-ci" ;
# Delete the current repository
rm -rf .git ;
# Rebuild the repository from the generated files and push to GitHub pages
cd site ;
git init ;
git add . ;
git commit -m "Deploy Travis CI build $TRAVIS_BUILD_NUMBER to GitHub pages" ;
git push -f https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG} master:gh-pages ;
fi
notifications:
email:
on_success: never
Expand Down

0 comments on commit ec9c00e

Please sign in to comment.