summaryrefslogtreecommitdiffhomepage
path: root/fabfile.py
blob: 29394f94e867150b5f7dd56748e7d83261872d19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from fabric.api import task, sudo, env
from fabric.contrib.project import rsync_project


@task
def upload_docs():
    target = "/var/www/paramiko.org"
    staging = "/tmp/paramiko_docs"
    sudo("mkdir -p %s" % staging)
    sudo("chown -R %s %s" % (env.user, staging))
    sudo("rm -rf %s/*" % target)
    rsync_project(local_dir='docs/', remote_dir=staging, delete=True)
    sudo("cp -R %s/* %s/" % (staging, target))