Skip to content

Do some tasks after deploy #98

@musashimm

Description

@musashimm

I want to do some tasks after deploy. So i put invoke as last entry in deploy section

desc "Deploys the current version to the server."
task :deploy => :environment do
  deploy do

  to :launch do
    queue 'touch tmp/restart.txt'
    invoke :qwerty
  end
end
end

task :qwerty do
  puts "ls"
  system 'ls'
end

But ls command is run before commands in the queue:

ls
Gemfile  Gemfile.lock  README.rdoc  Rakefile  app config  config.ru  db doc  lib  log  public  script  test  tmp  vendor
-----> Creating a temporary build path
-----> Fetching new git commits
-----> Using git branch 'master'

So how to check if deploy is finished or run command after deploy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions