Skip to content

Commit df301dd

Browse files
committed
Add travis build
1 parent 8d69c58 commit df301dd

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: rust
2+
addons:
3+
postgresql: 9.4
4+
script:
5+
- cargo test
6+
- cargo doc --no-deps
7+
after_success:
8+
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && ./.travis/update_docs.sh
9+
env:
10+
global:
11+
secure: NwuXXkfdUD7PEIL9gyvyob/yaGry14QMhiYOrEWPMDuDBrJsjwYJJFgYsyX3HJ+TNpLt/kdjpYU4Gr2fn4F0OUDM1fHzJtsc1wXgxTaLvIK7Jdu1nNFMtII7KZgRHvD7RQs/PM4xAPLHJYbdW5wdUyVE1YQ2DktIfI7rs9haWqU=

.travis/update_docs.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -o errexit -o nounset
4+
5+
git clone --branch gh-pages "https://$GH_TOKEN@github.com/${TRAVIS_REPO_SLUG}.git" deploy_docs
6+
cd deploy_docs
7+
8+
git config user.name "Steven Fackler"
9+
git config user.email "sfackler@gmail.com"
10+
11+
rm -rf doc
12+
mv ../target/doc .
13+
14+
git add -A .
15+
git commit -m "rebuild pages at ${TRAVIS_COMMIT}"
16+
git push

0 commit comments

Comments
 (0)