Created
April 1, 2011 14:53
-
-
Save ipmb/898266 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import os | |
| from fabric.api import * | |
| env.local_root=os.path.dirname(__file__) | |
| def deploy_github(): | |
| with lcd(env.local_root): | |
| local('git checkout master') | |
| commit = local('git log -1|grep commit', capture=True) | |
| local('make clean && make html') | |
| local('git checkout gh-pages') | |
| local('cp -r _build/html/* .') | |
| local('git add .') | |
| local('git commit -a -m "Build up to %s"' % commit) | |
| local('git push origin gh-pages') | |
| local('git checkout master') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment