mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
18 lines
438 B
Ruby
18 lines
438 B
Ruby
require 'time'
|
|
|
|
set(:log_level, Logger::DEBUG)
|
|
|
|
deploy_to = '/opt/sites/capistranorb_com'
|
|
release_timestamp = Time.now.utc.strftime("%Y%m%d%H%m%S")
|
|
|
|
desc "Build Jekyll Site And Sync With S3"
|
|
task :deploy do
|
|
sh "jekyll build"
|
|
on 'harrow' do
|
|
upload! '_site/', deploy_to, recursive: true
|
|
within(deploy_to) do
|
|
execute :mv, '_site/', release_timestamp
|
|
execute :ln, '-snf', release_timestamp, 'public'
|
|
end
|
|
end
|
|
end
|