Skip to content

Commit

Permalink
Automatically deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
carllerche committed Dec 19, 2014
1 parent 0105a29 commit b331966
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
---
language: rust
script:
- cargo test
- cargo doc
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && bash deploy.sh
env:
global:
secure: "btdSFScOk10KxYrlwXWcJVeUxVlWXV5YEsNvRWk1T+ysobKu/5uMznwB8zgxi7YtR+ICljXfJ+DhtalCYntFvGbhQ6HrKYoe7lCh0TH1GZX5sqvIdXbmoVZbeHsRV/uRshk1BBkY85cFm3afTHuh5pgGPwV+PVEcwYRrSn2JTQs="
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
MIO is a lightweight IO library for Rust with a focus on adding as
little overhead as possible over the OS abstractions.

[![Build Status](https://travis-ci.org/carllerche/mio.svg?branch=master)](https://travis-ci.org/carllerche/mio)

- [API documentation](http://carllerche.github.io/mio/mio/index.html)

## Usage

To use `mio`, first add this to your `Cargo.toml`:
Expand Down
18 changes: 18 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

rev=$(git rev-parse --short HEAD)

cd target/doc

git init
git config user.name "Steve Klabnik"
git config user.email "[email protected]"

git remote add upstream "https://$GH_TOKEN@github.com/carllerche/mio.git"
git fetch upstream && git reset upstream/gh-pages

touch .

git add -A .
git commit -m "rebuild pages at ${rev}"
git push -q upstream HEAD:gh-pages

0 comments on commit b331966

Please sign in to comment.