2013-06-30 09:33:26 -04:00
|
|
|
require 'time'
|
2013-11-21 05:19:48 -05:00
|
|
|
require 'sshkit/dsl'
|
2013-06-30 09:33:26 -04:00
|
|
|
|
|
|
|
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
|
2013-09-18 04:39:12 -04:00
|
|
|
sh "bundle exec jekyll build"
|
2013-07-22 11:50:02 -04:00
|
|
|
on 'harrow.io' do
|
2013-06-30 09:33:26 -04:00
|
|
|
upload! '_site/', deploy_to, recursive: true
|
|
|
|
within(deploy_to) do
|
|
|
|
execute :mv, '_site/', release_timestamp
|
|
|
|
execute :ln, '-snf', release_timestamp, 'public'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2013-09-18 01:48:49 -04:00
|
|
|
|
|
|
|
task :default => :deploy
|