Skip to content

Instantly share code, notes, and snippets.

@natea
Created June 22, 2011 11:14
Show Gist options
  • Save natea/1039895 to your computer and use it in GitHub Desktop.
Save natea/1039895 to your computer and use it in GitHub Desktop.
def deploy():
code_dir = '/srv/django/myproject'
with settings(warn_only=True):
if run("test -d %s" % code_dir).failed:
run("git clone user@vcshost:/path/to/repo/.git %s" % code_dir)
with cd(code_dir):
run("git pull")
run("touch app.wsgi")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment