mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added support for documentation build on Travis
This commit is contained in:
parent
f921f45787
commit
100f6c0e3b
@ -25,7 +25,15 @@ yarn run build
|
|||||||
[ $? -gt 0 ] && exit 1
|
[ $? -gt 0 ] && exit 1
|
||||||
|
|
||||||
# Deploy documentation to GitHub pages
|
# 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
|
# Terminate if we're not on a release branch
|
||||||
echo "$TRAVIS_BRANCH" | grep -qvE "^[0-9.]+$" && exit 0; :;
|
echo "$TRAVIS_BRANCH" | grep -qvE "^[0-9.]+$" && exit 0; :;
|
||||||
|
Loading…
Reference in New Issue
Block a user