Skip to content

Instantly share code, notes, and snippets.

@shelbybark
Created September 21, 2011 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shelbybark/1233516 to your computer and use it in GitHub Desktop.
Save shelbybark/1233516 to your computer and use it in GitHub Desktop.
Sample Fabric file
from fabric.api import env, run, sudo
def production():
env.hosts = ['serveraddress.com']
env.user = 'my_username'
def deploy():
run('cd /home/username/code/website; git fetch && git merge origin/master;')
sudo('sudo svc -du /etc/service/website')
def static_deploy():
run('cd /home/username/code/website; git fetch && git merge origin/master;')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment