-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8bb94db
commit a814811
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
language: rust | ||
before_script: | ||
- (cargo install mdbook --force || true) | ||
script: | ||
- mdbook build | ||
- mdbook test | ||
after_success: | ||
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && bash deploy.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit -o nounset | ||
|
||
if [ "$TRAVIS_BRANCH" != "master" ] | ||
then | ||
echo "This commit was made against the $TRAVIS_BRANCH and not the master! No deploy!" | ||
exit 0 | ||
fi | ||
|
||
rev=$(git rev-parse --short HEAD) | ||
|
||
cd book | ||
|
||
git init | ||
git config user.name "Steve Klabnik" | ||
git config user.email "steve@steveklabnik.com" | ||
|
||
git remote add upstream "https://$GH_TOKEN@github.com/rust-lang-nursery/edition-guide.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 |