From 100f6c0e3b82e9595a94a679dbb69e2a1d612300 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 6 Apr 2017 23:49:45 +0200 Subject: [PATCH] Added support for documentation build on Travis --- scripts/travis | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/travis b/scripts/travis index 34d9c9a6c..06529478c 100755 --- a/scripts/travis +++ b/scripts/travis @@ -25,7 +25,15 @@ yarn run build [ $? -gt 0 ] && exit 1 # Deploy documentation to GitHub pages -# mkdocs gh-deploy +if [[ "$TRAVIS_BRANCH" == "master" ]]; then + REMOTE="https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material" + + # Set configuration for repository and deploy documentation + git config --global user.name "${GH_NAME}" + git config --global user.email "${GH_EMAIL}" + git remote set-url origin $REMOTE + mkdocs gh-deploy --force +fi # Terminate if we're not on a release branch echo "$TRAVIS_BRANCH" | grep -qvE "^[0-9.]+$" && exit 0; :;