Skip to content

Commit fccd711

Browse files
committed
Move docs to this repo and auto deploy
1 parent 09e8a49 commit fccd711

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@ language: rust
22
addons:
33
postgresql: 9.3
44
script:
5-
- cargo test
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: r3ugr11ER3l892nwRNDgpf3PMzZ+hucTGuhGHdatUiMGJ6us9E4inhG+dqvV8UoctMFjaO1tYxVHlwpgxo17Spnc6lopH+MrRHP7H42eEkUZbMEAKiHss/M1w6KocVEKsJdTtaNfN8V7MWAjCDAIL4txTbffBGnIfBhPGWVh09M=

.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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Steven Fackler <sfackler@gmail.com>"]
55
license = "MIT"
66
description = "Postgres support for the r2d2 connection pool"
77
repository = "https://github.com/sfackler/r2d2-postgres"
8-
documentation = "https://sfackler.github.io/doc/r2d2_postgres"
8+
documentation = "https://sfackler.github.io/r2d2-postgres/doc/r2d2_postgres"
99
keywords = ["postgres", "sql", "pool", "database"]
1010

1111
[lib]

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
r2d2-postgres
22
=============
33

4+
[![Build Status](https://travis-ci.org/sfackler/r2d2-postgres.svg?branch=v0.6.0)](https://travis-ci.org/sfackler/r2d2-postgres)
5+
46
[rust-postgres](https://github.com/sfackler/rust-postgres) support library for the [r2d2](https://github.com/sfackler/r2d2) connection pool.
57

6-
Documentation is available at https://sfackler.github.io/doc/r2d2_postgres
8+
Documentation is available at https://sfackler.github.io/r2d2-postgres/doc/r2d2_postgres
79

810
# Example
911

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Postgres support for the `r2d2` connection pool.
2-
#![doc(html_root_url="https://sfackler.github.io/doc")]
2+
#![doc(html_root_url="https://sfackler.github.io/r2d2-postgres/doc")]
33
#![feature(core)]
44
#![warn(missing_docs)]
55
extern crate r2d2;

0 commit comments

Comments
 (0)