Fork me on GitHub
Mina About deploy.rb

About deploy.rb

The file deploy.rb is simply a Rakefile invoked by Rake. In fact, mina is mostly an alias that invokes Rake to load deploy.rb.

# Sample config/deploy.rb
set :domain, ''

task :restart do
  queue 'sudo service restart apache'

As it’s all Rake, you can define tasks that you can invoke using mina. In this example, it provides the mina restart command.

The magic of Mina is in the new commands it gives you.

The queue command queues up Bash commands to be ran on the remote server. If you invoke mina restart, it will invoke the task above and run the queued commands on the remote server via SSH.

See the command queue for more information on the queue command.