Skip to content

Commit 561d7be

Browse files
committed
Move docs to this repo and auto build in travis
1 parent 05554fd commit 561d7be

3 files changed

Lines changed: 28 additions & 4 deletions

File tree

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ language: rust
22
addons:
33
postgresql: 9.3
44
before_script:
5-
- ./.travis/setup.sh
5+
- "./.travis/setup.sh"
66
script:
7-
- cargo test
8-
- cargo test --features "uuid"
7+
- cargo test
8+
- cargo test --features "uuid"
9+
- cargo doc --no-deps
10+
after_success:
11+
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && ./travis/update_docs.sh
12+
env:
13+
global:
14+
secure: cZEcWfKI7Pml5og9o1zBMYhbj20Pa22kYVDTDEHqvOoe0kq1cnB5sTH7P0FUgiPq2Ax4B8eQIaC30yvFJ02R7kmTys4aQD98NyCyzdO+dqYi93C9PFYGhl/DKsb4iZ2VP+8LffYSwRGsNSzE9Fj9SFRMIOjHN+UfaVHXaUVjE7Y=

.travis/update_docs.sh

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

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
//! }
5151
//! }
5252
//! ```
53-
#![doc(html_root_url="https://sfackler.github.io/doc")]
53+
#![doc(html_root_url="https://sfackler.github.io/rust-postgres/doc")]
5454
#![feature(plugin, unsafe_destructor, collections, io, core, path, std_misc)]
5555
#![warn(missing_docs)]
5656

0 commit comments

Comments
 (0)