Build and publish docs on push, not on pull-requests
This commit is contained in:
1 parent
0b4b849583
commit
83c2bcd418
2 files changed
+7
-3
No files matched your search
+1
-1
@@ -25,4 +25,4 @@ script:
|
||||
after_success:
|
||||
- go get github.com/mattn/goveralls
|
||||
- $HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci
|
||||
- site/build-and-publish.sh
|
||||
- test "${TRAVIS_PULL_REQUEST}" = "false" && site/build-and-publish.sh
|
||||
@@ -6,9 +6,13 @@ cd $(dirname $0)/
|
||||
|
||||
BRANCH=${TRAVIS_BRANCH:-`git rev-parse --abbrev-ref @`}
|
||||
COMMIT=${TRAVIS_COMMIT:-`git rev-parse @`}
|
||||
OUTPUT="weave/${BRANCH}/${COMMIT}"
|
||||
|
||||
export BRANCH COMMIT
|
||||
export BRANCH COMMIT OUTPUT
|
||||
|
||||
bundle install --path=.bundle
|
||||
bundle exec jekyll build --verbose
|
||||
gsutil -m cp -z html,css -a public-read -R _site gs://docs.weave.works/weave/${BRANCH}/${COMMIT}
|
||||
|
||||
gsutil -m cp -z html,css -a public-read -R _site "gs://docs.weave.works/${OUTPUT}"
|
||||
|
||||
echo "Published at http://docs.weave.works/${OUTPUT}"
|
||||
Reference in new issue
Block a user