-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supporting automatic documentation deployment.
- Loading branch information
Showing
3 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- '0.10' | ||
- '0.11' | ||
- '0.10' | ||
- '0.11' | ||
|
||
script: npm run $ACTION | ||
|
||
before_script: | ||
- psql -c 'create database "azul_test";' -U postgres | ||
- mysql -e 'create database `azul_test`;' | ||
env: PG_USER=postgres MYSQL_USER=travis | ||
- psql -c 'create database "azul_test";' -U postgres | ||
- mysql -e 'create database `azul_test`;' | ||
|
||
env: | ||
- ACTION=test PG_USER=postgres MYSQL_USER=travis | ||
- ACTION=docs | ||
|
||
matrix: | ||
exclude: | ||
- env: ACTION=docs | ||
include: | ||
- env: ACTION=docs | ||
node_js: '0.10' | ||
allow_failures: | ||
- node_js: '0.11' | ||
- node_js: '0.11' | ||
|
||
fast_finish: true | ||
|
||
sudo: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# note that $GITHUB_REPO contains an API key in it, so be careful to not allow | ||
# that to end up as part of the output ever. | ||
|
||
set -e | ||
|
||
if [ "`git rev-parse HEAD`" != "`git rev-parse origin/master --`" ]; then | ||
echo "Not deploying docs for non-master commit `git rev-parse --short HEAD`" | ||
exit 0 | ||
fi | ||
|
||
mkdir -p .deploy | ||
cd .deploy | ||
git clone -q --depth 1 --branch gh-pages --single-branch $GITHUB_REPO . | ||
git config user.name $GITHUB_NAME | ||
git config user.email $GITHUB_EMAIL | ||
|
||
rm -rf ./* | ||
cp -r ../public/* . | ||
|
||
git add -A . | ||
git commit -m 'Site updated' || echo 'No update required.' | ||
git push -q origin gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters