Automatically update docs

This commit is contained in:
Carl Lerche
2015-02-09 22:40:19 -08:00
parent 17637665e9
commit ca0e971002
2 changed files with 26 additions and 0 deletions
+8
View File
@@ -4,3 +4,11 @@ sudo: false
script:
- cargo test
- cargo doc --no-deps
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && bash deploy.sh
env:
global:
secure: "mBLJANLvtmyWCXw4zMquptqHQnws0pF+C/u4zL1Jfwz8T4UnUjmBUMxSOgSEIzrOM3qb+CTCjY2/j6BM21+/Zfdl8k8CvFWtkqQUPwIfrtwddCgI+P8Hlrk8G43drz/8XAbZ7dOl+Ovwhr0xnSD9ImfyXJec1kDWhubmgyt47Fs="
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
rev=$(git rev-parse --short HEAD)
cd target/doc
git init
git config user.name "Carl Lerche"
git config user.email "me@carllerche.com"
git remote add upstream "https://$GH_TOKEN@github.com/carllerche/bytes"
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