Upload docs to S3.
This commit is contained in:
parent
2d03ce8e51
commit
f94461a9ca
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue