Upload docs to S3.

This commit is contained in:
Yorick Peterse 2015-01-17 18:00:05 +01:00
parent 2d03ce8e51
commit f94461a9ca
1 changed files with 6 additions and 6 deletions

View File

@ -6,12 +6,12 @@ namespace :doc do
desc 'Generates and uploads the documentation' desc 'Generates and uploads the documentation'
task :upload => :build do task :upload => :build do
root_dir = "/srv/http/code.yorickpeterse.com/public/oga" version = GEMSPEC.version.to_s
version_dir = File.join(root_dir, Oga::VERSION) bucket = 's3://code.yorickpeterse.com'
directory = GEMSPEC.name
sh "scp -r yardoc europa:#{version_dir}" sh "aws s3 rm --recursive #{bucket}/#{directory}/latest"
sh "aws s3 sync yardoc #{bucket}/#{directory}/#{version}"
sh "ssh europa 'rm -f #{root_dir}/latest " \ sh "aws s3 sync yardoc #{bucket}/#{directory}/latest"
"&& ln -s #{version_dir} #{root_dir}/latest'"
end end
end end