From 5ff7f39f08932d59f1902cdfd14f32cd8d115bfe Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 11 Sep 2014 00:10:58 +0200 Subject: [PATCH] Rake task for uploading documentation. --- task/doc.rake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/task/doc.rake b/task/doc.rake index 4419d94..8770904 100644 --- a/task/doc.rake +++ b/task/doc.rake @@ -2,3 +2,14 @@ desc 'Generates YARD documentation' task :doc => :generate do sh 'yard' end + +desc 'Generates and uploads the documentation' +task :upload_doc => :doc do + root_dir = "/srv/http/code.yorickpeterse.com/public/oga" + version_dir = File.join(root_dir, Oga::VERSION) + + sh "scp -r yardoc europa:#{version_dir}" + + sh "ssh europa 'rm -f #{root_dir}/latest " \ + "&& ln -s #{version_dir} #{root_dir}/latest'" +end