Skip to content

Commit

Permalink
update travis to deploy on master merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mickmcgrath13 committed Oct 31, 2016
1 parent d586cc8 commit 2d4aaed
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
publish-docs:
git checkout -b gh-pages
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
rm -rf node_modules
rm -rf site/node_modules
rm -rf docs
Expand Down
2 changes: 2 additions & 0 deletions doc/guides/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions gh-pages-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
echo "$TRAVIS_BRANCH"
if [ [["$TRAVIS_BRANCH"] == ["master"]] -o [["$TRAVIS_BRANCH"] == ["gh-pages-deployment-test"]] ]; then
make
fi

0 comments on commit 2d4aaed

Please sign in to comment.