Move the setup task before the deploy task

This commit is contained in:
gregoirenovel 2018-10-24 14:15:36 +02:00
parent 916dd17873
commit eb6132b5cb

View file

@ -9,6 +9,14 @@ def domains_for_stage(stage)
end end
end end
task :setup do
domains = domains_for_stage(ENV.fetch('STAGE'))
domains.each do |domain|
sh "mina setup domain=#{domain} force_asset_precompile=true"
end
end
task :deploy do task :deploy do
domains = domains_for_stage(ENV.fetch('STAGE')) domains = domains_for_stage(ENV.fetch('STAGE'))
branch = ENV.fetch('BRANCH') branch = ENV.fetch('BRANCH')
@ -17,11 +25,3 @@ task :deploy do
sh "mina deploy domain=#{domain} branch=#{branch} force_asset_precompile=true" sh "mina deploy domain=#{domain} branch=#{branch} force_asset_precompile=true"
end end
end end
task :setup do
domains = domains_for_stage(ENV.fetch('STAGE'))
domains.each do |domain|
sh "mina setup domain=#{domain} force_asset_precompile=true"
end
end