-
-
Save hzbd/5445729 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from os import path | |
from fabric.api import local, settings, abort, run, cd, env, sudo | |
from fabric.contrib.project import rsync_project | |
env.hosts = [host,] | |
env.user = 'user' | |
exclude = [] | |
def prepare_deploy(): | |
local("rm -rf app/cache/*") | |
local("rm -rf app/logs/*") | |
local("app/console cache:clear") | |
def deploy(): | |
prepare_deploy() | |
remote_dir = "path to remote dir" | |
local_dir = os.getcwd() | |
rsync_project(remote_dir, local_dir+"/", exclude="", delete=True) | |
with cd(remote_dir): | |
run(" app/console assets:install web --symlink") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment