Skip to content

Commit 2d4aaed

Browse files
committed
update travis to deploy on master merge
1 parent d586cc8 commit 2d4aaed

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,14 @@ before_install:
66
- "sh -e /etc/init.d/xvfb start"
77
script: npm test
88
sudo: false
9+
env:
10+
global:
11+
- secure: >-
12+
HSvi9oV6wtmfWtEYws8wA64+JTpjvXIWOeR1U5UBWDP6qoPAXGaqwQUS98QS+oimfdJoAzZ/RwBIyR8tUlgflZ1JhRZ8zmYrmodRs5Ytxf/crt9xgS+e8Aq9S7a5rWDJN49wV8C9jUIBjN1RQKwev5iW+y2RPQUacEAvPU6eAX0=
13+
deploy:
14+
provider: script
15+
script: gh-pages-deploy.sh
16+
on:
17+
branch:
18+
- master
19+
- gh-pages-deployment-test

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
publish-docs:
22
git checkout -b gh-pages
3+
git config --global user.email "[email protected]"
4+
git config --global user.name "Travis CI"
35
rm -rf node_modules
46
rm -rf site/node_modules
57
rm -rf docs

doc/guides/contribute.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ Once the docs look right locally, commit your changes, then run:
309309

310310
The make script will generate the documentation again and push out the `gh-pages` branch.
311311

312+
*Note* This is done automatically when a branch is merged into master.
313+
312314

313315
### Writing API documentation
314316

gh-pages-deploy.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
echo "$TRAVIS_BRANCH"
3+
if [ [["$TRAVIS_BRANCH"] == ["master"]] -o [["$TRAVIS_BRANCH"] == ["gh-pages-deployment-test"]] ]; then
4+
make
5+
fi

0 commit comments

Comments
 (0)