Skip to content

Commit cd64f6d

Browse files
committed
Automatically deploy docs
1 parent 23315dd commit cd64f6d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
language: rust
22
sudo: false
3+
4+
script:
5+
- cargo test
6+
- cargo doc --no-deps
7+
8+
after_success:
9+
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && bash deploy.sh
10+
11+
env:
12+
global:
13+
secure: "Ox2NrSoMKHBNlUqPayqqCxOYy7SlM+uBPsJQ32q4eFhk0Z1ciyWAvt77WrUBSGbvKtpmDXJasN9ldhScSsWHBxzTfGIRBw0ZT5vkKnvWk01o58aBdxtdb2wDDMBlDUrMc6ccK95e6qff+TGR4zqwMFCPlsu5bKzAiVBONtgOnhk="

deploy.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
rev=$(git rev-parse --short HEAD)
4+
5+
cd target/doc
6+
7+
git init
8+
git config user.name "Carl Lerche"
9+
git config user.email "[email protected]"
10+
11+
git remote add upstream "https://$GH_TOKEN@github.com/carllerche/nix-rust"
12+
git fetch upstream && git reset upstream/gh-pages
13+
14+
touch .
15+
16+
git add -A .
17+
git commit -m "rebuild pages at ${rev}"
18+
git push -q upstream HEAD:gh-pages

0 commit comments

Comments
 (0)