Created
November 26, 2016 19:46
-
-
Save Excape/4738f26f076e926d724a8b7de02c3c59 to your computer and use it in GitHub Desktop.
Deploy mkdocs to GH-Pages with Travis
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
#!/bin/bash | |
set -e # exit with nonzero exit code if anything fails | |
#Build with mkdocs into ./site | |
mkdocs build --clean | |
# Checkout gh-pages | |
git clone --branch gh-pages git@github.com:Excape/hsr-docs-hs16.git gh-pages | |
#sync site | |
rsync -av site/ gh-pages/ | |
#commit | |
cd gh-pages | |
git config user.name "Travis CI" | |
git config user.email "r1suter@hsr.ch" | |
git add . | |
git commit -m "Deploy from Travis CI" | |
git push |
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
mkdocs>=0.15.3 | |
python-markdown-math>=0.2 |
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
before_install: sudo pip install -r requirements.txt | |
script: bash ./build.sh | |
sudo: required |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment