Skip to content

Instantly share code, notes, and snippets.

@ipmb
Created April 1, 2011 14:53
Show Gist options
  • Save ipmb/898266 to your computer and use it in GitHub Desktop.
Save ipmb/898266 to your computer and use it in GitHub Desktop.
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