woodwind/fabfile.py
Kyle Mahan 32cdeaa781 query individual feeds by their url rather than id
prevent nefarious people like @dissolve from crawling all the
subscribed feeds :P
2015-02-09 22:46:02 -08:00

34 lines
648 B
Python

from fabric.api import local, prefix, cd, run, env, lcd
env.hosts = ['orin.kylewm.com']
REMOTE_PATH = '/srv/www/kylewm.com/woodwind'
def commit():
local("git add -p")
local("git diff-index --quiet HEAD || git commit")
def push():
local("git push origin master")
def pull():
with cd(REMOTE_PATH):
run("git pull origin master")
run("git submodule update")
def restart():
with cd(REMOTE_PATH):
with prefix("source venv/bin/activate"):
run("pip install -r requirements.txt")
run("supervisorctl restart ww:*")
def deploy():
commit()
push()
pull()
restart()