2018-09-20 11:20:57 +02:00
|
|
|
task :deploy do
|
2018-10-19 11:09:57 +02:00
|
|
|
if ENV['STAGE_NAME'] == 'dev'
|
|
|
|
domains = ['web1.dev', 'web2.dev']
|
|
|
|
elsif ENV['STAGE_NAME'] == 'master'
|
|
|
|
domains = ['web1', 'web2']
|
|
|
|
end
|
|
|
|
|
|
|
|
branch = ENV['STAGE_NAME']
|
|
|
|
|
2018-09-20 11:20:23 +02:00
|
|
|
domains.each do |domain|
|
2018-10-19 11:09:57 +02:00
|
|
|
sh "mina deploy domain=#{domain} branch=#{branch} force_asset_precompile=true"
|
2018-09-03 18:36:09 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
task :setup do
|
|
|
|
domains = ['web1', 'web2']
|
|
|
|
domains.each do |domain|
|
|
|
|
sh "mina setup domain=#{domain} force_asset_precompile=true"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
task :setup_dev do
|
|
|
|
domains = ['web1.dev', 'web2.dev']
|
|
|
|
domains.each do |domain|
|
|
|
|
sh "mina setup domain=#{domain} force_asset_precompile=true"
|
2018-09-20 11:20:23 +02:00
|
|
|
end
|
|
|
|
end
|