Skip to content

Commit

Permalink
(ci) after_deploy generate doc/ghpages
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI committed Dec 18, 2017
1 parent 45a6b65 commit b7305f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ deploy:
branch: master
tags: true

after_deploy:
- DEPLOY=1 docs/build.sh

notifications:
email: false

Expand Down
10 changes: 10 additions & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#/usr/local/env sh

This comment has been minimized.

Copy link
@nkprince007

nkprince007 Dec 18, 2017

Contributor

set -x -e -o pipefail perhaps? lets us view the commands as they run.

(cd docs && go run main.go &&
sed -i 's|lab.md|index.md|' *.md &&
mv lab.md index.md)
if [ -n ${DEPLOY} ]; then
git config --global user.email "travis@travis-ci.org" && git config --global user.name "Travis CI"
git remote add origin-lab https://${GITHUB_TOKEN}@github.com/zaquestion/lab.git > /dev/null 2>&1
git checkout docstest && git add docs && git commit -m "(docs) ${TRAVIS_TAG}" && git push origin-lab master
fi

0 comments on commit b7305f8

Please sign in to comment.