from fabric.api import run, cd, env, task env.hosts = ['theos.kyriasis.com'] code_dir = 'code/website' @task(default=True) def deploy(): pull() make() @task def pull(): with cd(code_dir): run("git pull") @task def make(): with cd(code_dir): run("make")