#!/bin/bash # Author: Steve Klabnik # github.com/steveklabnik/automatically_update_github_pages_with_travis_example set -o errexit -o nounset rev=$(git rev-parse --short HEAD) cargo doc cd target/doc/ git init git remote add upstream "git@github.com:LukasKalbertodt/xswag-base.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