stebalienOP•
  1. Create an empty gh-pages branch.
  2. Put the hook in '.git/hooks/post-commit' and make it executable.
  3. Commit a change. On commit, it will re-compile the documentation and replace any files in the gh-pages branch with the new documentation.

It shouldn't eat your babies but it might so read it over and backup before using.

2
formode•

Looks like mktemp -d isn't valid on Mac (at least) without a prefix.

➜  raft git:(master) mktemp -d
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
1
stebalienOP•

I've put this in a git repo. It should now work on OSX (please test carefully first, I don't own a Mac), and will also create the gh-pages branch if it doesn't exist. https://github.com/Stebalien/rust-git-hooks

1