Permalink
Browse files

capistrano deployment recipe added

  • Loading branch information...
1 parent 707711e commit a5ac8216fe6eb81d58c71509330a6c70dc2eb1ff @mhayes mhayes committed Jun 11, 2012
Showing with 39 additions and 0 deletions.
  1. +3 −0 Capfile
  2. +36 −0 config/deploy.rb
View
@@ -0,0 +1,3 @@
+load 'deploy'
+Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
+load 'config/deploy' # remove this line to skip loading any of the default tasks
View
@@ -0,0 +1,36 @@
+# use local key for authentication
+ssh_options[:forward_agent] = true
+default_run_options[:pty] = true
+
+set :application, "foundation"
+set :repository, "git@github.com:zurb/#{application}.git"
+set :user, application
+set :deploy_to, "/var/www/#{application}"
+set :use_sudo, false
+
+set :scm, :git
+
+server 'app1', :web
+
+after "deploy:update_code", "deploy:link_cached_files"
+after "deploy:update_code", "deploy:link_assets"
+set :keep_releases, 3
+after "deploy:update", "deploy:cleanup"
+
+namespace :deploy do
+ task :default do
+ update
+ end
+
+ desc "Symlink cached files"
+ task :link_cached_files do
+ run "rm -rf #{release_path}/marketing/cache"
+ run "ln -nfs #{shared_path}/cache #{release_path}/marketing/cache"
+ end
+
+ desc "Symlink to stylesheets and javascripts"
+ task :link_assets do
+ run "ln -nfs #{release_path}/stylesheets #{release_path}/marketing/stylesheets"
+ run "ln -nfs #{release_path}/javascripts #{release_path}/marketing/javascripts"
+ end
+end

0 comments on commit a5ac821

Please sign in to comment.