From 2d4aaed6801970f7755d6ff321a6cceab40c2edf Mon Sep 17 00:00:00 2001 From: Mick McGrath Date: Fri, 28 Oct 2016 15:00:17 -0500 Subject: [PATCH] update travis to deploy on master merge --- .travis.yml | 11 +++++++++++ Makefile | 2 ++ doc/guides/contribute.md | 2 ++ gh-pages-deploy.sh | 5 +++++ 4 files changed, 20 insertions(+) create mode 100644 gh-pages-deploy.sh diff --git a/.travis.yml b/.travis.yml index 7b61a2f0..6ece54fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,3 +6,14 @@ before_install: - "sh -e /etc/init.d/xvfb start" script: npm test sudo: false +env: + global: + - secure: >- + HSvi9oV6wtmfWtEYws8wA64+JTpjvXIWOeR1U5UBWDP6qoPAXGaqwQUS98QS+oimfdJoAzZ/RwBIyR8tUlgflZ1JhRZ8zmYrmodRs5Ytxf/crt9xgS+e8Aq9S7a5rWDJN49wV8C9jUIBjN1RQKwev5iW+y2RPQUacEAvPU6eAX0= +deploy: + provider: script + script: gh-pages-deploy.sh + on: + branch: + - master + - gh-pages-deployment-test \ No newline at end of file diff --git a/Makefile b/Makefile index 673af47e..1b60ad4e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ publish-docs: git checkout -b gh-pages + git config --global user.email "travis@bitovi.com" + git config --global user.name "Travis CI" rm -rf node_modules rm -rf site/node_modules rm -rf docs diff --git a/doc/guides/contribute.md b/doc/guides/contribute.md index e6fb5ecf..f28516ec 100644 --- a/doc/guides/contribute.md +++ b/doc/guides/contribute.md @@ -309,6 +309,8 @@ Once the docs look right locally, commit your changes, then run: The make script will generate the documentation again and push out the `gh-pages` branch. +*Note* This is done automatically when a branch is merged into master. + ### Writing API documentation diff --git a/gh-pages-deploy.sh b/gh-pages-deploy.sh new file mode 100644 index 00000000..f48fb8ed --- /dev/null +++ b/gh-pages-deploy.sh @@ -0,0 +1,5 @@ +#!/bin/bash +echo "$TRAVIS_BRANCH" +if [ [["$TRAVIS_BRANCH"] == ["master"]] -o [["$TRAVIS_BRANCH"] == ["gh-pages-deployment-test"]] ]; then + make +fi \ No newline at end of file