fabfile.py @ 70b7b8626310

Fix typo
author "Jordan Eldredge <jordan@jordaneldredge.com>"
date Thu, 17 Sep 2015 09:20:42 -0700
parents 5c54d39bce36
children (none)
from fabric.api import *
import os
import fabric.contrib.project as project

PROD = 'sl'
DEST_PATH = '/var/www/stevelosh.com/'
ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
DEPLOY_PATH = os.path.join(ROOT_PATH, 'deploy')

def clean():
    local('rm -rf ./deploy')

def generate():
    local('hyde -g -s .')

def regen():
    clean()
    generate()

def serve():
    local('hyde -w -s . -k')

def reserve():
    regen()
    serve()

def smush():
    local('smusher ./media/images')

@hosts(PROD)
def publish():
    regen()
    project.rsync_project(
        remote_dir=DEST_PATH,
        local_dir=DEPLOY_PATH.rstrip('/') + '/',
        delete=True
    )