#!/bin/bash git checkout master (cd docs; rm -rf .build; make html; (cd .build/html; sphinx-to-github;)) git checkout gh-pages cp -r docs/.build/html/* . git commit . -m "Autogenerated documentation for github." git push origin gh-pages git checkout master