Permalink
Browse files

Meh fabfile for docs uploading

  • Loading branch information...
1 parent e99399c commit 8e5f774965bc281b8154379f68e6152356eedfd8 @bitprophet bitprophet committed Oct 15, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 fabfile.py
View
@@ -0,0 +1,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))

0 comments on commit 8e5f774

Please sign in to comment.