Skip to content

Commit

Permalink
Use travis to build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ah- committed Mar 1, 2018
1 parent d2cbba4 commit 60bc89c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ before_install: set -e

install:
- bash ./scripts/install.sh
- cargo install mdbook

script:
- make
- make docs

cache:
cargo: true
Expand Down
Empty file modified scripts/install.sh
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions scripts/publish-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

set -euxo pipefail

pushd book

echo -e "Initializing Git"
git init
git config user.name "Andreas Heider"
git config user.email "[email protected]"

git remote add upstream "https://$GH_TOKEN@github.com/ah-/anne-key.git"
git fetch upstream --quiet
git reset upstream/gh-pages --quiet

touch .

echo -e "Pushing changes to gh-pages"
git add -A .
git commit -m "rebuild pages at ${rev}" --quiet
git push -q upstream HEAD:gh-pages --quiet

echo -e "Deployed docs to GitHub Pages"

popd

0 comments on commit 60bc89c

Please sign in to comment.