commit 4a27bdbd4a2e306c013c0d8326b6e15aa8d5b4eb Author: Arturo Filastò art@fuffa.org Date: Thu Jan 31 13:41:12 2013 +0100
Add fabfile for updating of ooniprobe docs on ooni.tpo --- docs/fabfile.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/docs/fabfile.py b/docs/fabfile.py new file mode 100644 index 0000000..d0461fd --- /dev/null +++ b/docs/fabfile.py @@ -0,0 +1,20 @@ +import os +from fabric.api import run +from fabric.context_managers import settings +from fabric.operations import sudo, local, put + +def update_docs(): + local('make html') + build_dir = os.path.join(os.getcwd(), 'build', 'html') + put(build_dir, '/tmp') + + run("sudo -u ooni rm -rf /home/ooni/website/build/docs/") + run("sudo -u ooni cp -R /tmp/html/ /home/ooni/website/build/docs") + + run("rm -rf /tmp/html") + update_website() + +def update_website(): + run("sudo -u mirroradm /usr/local/bin/static-master-update-component ooni.torproject.org") + +