Skip to content

Instantly share code, notes, and snippets.

@glidenote
Created June 12, 2012 07:06
Show Gist options
  • Save glidenote/2915782 to your computer and use it in GitHub Desktop.
Save glidenote/2915782 to your computer and use it in GitHub Desktop.
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
# Basic settings:
# domain - The hostname to SSH to
# deploy_to - Path to deploy into
# repository - Git repo to clone from (needed by mina/git)
# user - Username in the server to SSH to (optional)
set :domain, 'foobar.com'
set :deploy_to, '/var/www/foobar.com'
set :repository, 'git://...'
# set :user, 'foobar'
desc "Deploys the current version to the server."
task :deploy do
deploy do
# Put things that will set up an empty directory into a fully set-up
# instance of your project.
invoke :'git:clone'
invoke :'bundle:install'
invoke :'rails:db_migrate'
invoke :'rails:assets_precompile'
to :launch do
queue 'touch tmp/restart.txt'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment