Source

blog-design / fabfile.py

Full commit
"""
Script for deploying code from my local laptop to a remote server.

Author: Kevin Burke <kev@inburke.com>

Usage:

    fab deploy
"""
from fabric.api import env, run, cd, local

env.hosts = ['kevinburke@kevinburke.webfactional.com']
env.user = 'kevinburke'
env.key_filename = '/Users/kevin/.ssh/webfaction_rsa'

def deploy():
    local("hg push")
    code_dir = '~/webapps/b/wp-content/themes'
    with cd(code_dir):
        run("hg pull; hg up")
        # XXX clear the cache.