This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
studentersamfundet.no/fabfile.py
T
nikolark 969c63c752 New style wordpress
This enables automagic updates of WP

- Delete wordpress install
- Move theme(s) to top
- Move local plugins to ./plugins
- Simplify i18n
2017-07-05 01:03:17 +02:00

39 lines
848 B
Python

from fabric.operations import local as lrun
from fabric.api import cd, env, lcd, run
env.use_ssh_config = True
env.forward_agent = True
env.hosts = ['dreamcast.neuf.no']
env.user = 'gitdeploy'
project_path = '/var/www/studentersamfundet.no/www'
theme_path = 'dns2015/'
gulp_file = '{}gulpfile.js'.format(theme_path)
def install():
with lcd(theme_path):
lrun('npm install && bower install')
def _gulp_cmd(cmd):
lrun('gulp --gulpfile={} {}'.format(gulp_file, cmd))
def build():
_gulp_cmd('build')
def i18n():
_gulp_cmd('i18n')
def watch():
_gulp_cmd('watch')
def deploy():
with cd(project_path):
run('git pull')
def upgrade_wp():
with cd(project_path):
run('wp core update')
run('wp plugin update --all')
run('wp theme update --all')
run('wp core language update')