deploy: fix after_party deployment

This can be tested locally (without running any SSH commands) using:

```shell
bundle exec mina deploy domain="test.domain" to=production --simulate`
```

This commit turns the after_party command from:

```
cd "/var/www/tps/current" && RAILS_ENV="production" bundle exec rake after_party:run
```

to:

```
RAILS_ENV="production" bundle exec rake after_party:run
```

which is more in line with how other commands are run.
This commit is contained in:
Pierre de La Morinerie 2018-10-16 12:49:34 +00:00 committed by gregoirenovel
parent f1924d22e4
commit 3d897ad488

View file

@ -104,6 +104,16 @@ namespace :yarn do
end
end
namespace :after_party do
desc "Run after_party tasks."
task :run do
queue %{
echo "-----> Running deploy tasks"
#{echo_cmd %[#{rake} after_party:run]}
}
end
end
desc "Deploys the current version to the server."
task :deploy => :environment do
queue 'export PATH=$PATH:/usr/local/rbenv/bin:/usr/local/rbenv/shims'
@ -116,7 +126,7 @@ task :deploy => :environment do
invoke :'bundle:install'
invoke :'yarn:install'
invoke :'rails:db_migrate'
invoke :'rake[after_party:run]'
invoke :'after_party:run'
invoke :'rails:assets_precompile:force'
to :launch do