Add rake task to run after party with mina
This commit is contained in:
parent
bd519835cd
commit
55525af060
2 changed files with 16 additions and 2 deletions
|
@ -57,7 +57,7 @@ namespace :after_party do
|
||||||
desc "Run after_party tasks."
|
desc "Run after_party tasks."
|
||||||
task :run do
|
task :run do
|
||||||
command %{
|
command %{
|
||||||
echo "-----> Running deploy tasks"
|
echo "-----> Running after_party"
|
||||||
#{echo_cmd %[bundle exec rake after_party:run]}
|
#{echo_cmd %[bundle exec rake after_party:run]}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -103,7 +103,6 @@ task :deploy do
|
||||||
invoke :'bundle:install'
|
invoke :'bundle:install'
|
||||||
invoke :'yarn:install'
|
invoke :'yarn:install'
|
||||||
invoke :'rails:db_migrate'
|
invoke :'rails:db_migrate'
|
||||||
# invoke :'after_party:run'
|
|
||||||
invoke :'rails:assets_precompile'
|
invoke :'rails:assets_precompile'
|
||||||
|
|
||||||
on :launch do
|
on :launch do
|
||||||
|
@ -114,3 +113,11 @@ task :deploy do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
task :post_deploy do
|
||||||
|
command 'export PATH=$PATH:/home/ds/.rbenv/bin:/home/ds/.rbenv/shims'
|
||||||
|
command 'source /home/ds/.profile'
|
||||||
|
command 'cd /home/ds/current'
|
||||||
|
|
||||||
|
invoke :'after_party:run'
|
||||||
|
end
|
||||||
|
|
|
@ -25,3 +25,10 @@ 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 :post_deploy do
|
||||||
|
domains = domains_for_stage(ENV.fetch('STAGE'))
|
||||||
|
branch = ENV.fetch('BRANCH')
|
||||||
|
|
||||||
|
sh "mina post_deploy domain=#{domains.first} branch=#{branch}"
|
||||||
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue