Permalink
Browse files

setup capistrano deployment

  • Loading branch information...
mhayes committed Jun 28, 2012
1 parent aef87bb commit 12fe243da611bdfd88d577b650de54563b843753
Showing with 59 additions and 0 deletions.
  1. +5 −0 Capfile
  2. +15 −0 Gemfile.lock
  3. +38 −0 config/deploy.rb
  4. +1 −0 foundation.gemspec
View
@@ -0,0 +1,5 @@
+load 'deploy'
+# Uncomment if you are using Rails' asset pipeline
+ # load 'deploy/assets'
+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
@@ -11,20 +11,35 @@ PATH
GEM
remote: https://rubygems.org/
specs:
+ capistrano (2.12.0)
+ highline
+ net-scp (>= 1.0.0)
+ net-sftp (>= 2.0.0)
+ net-ssh (>= 2.0.14)
+ net-ssh-gateway (>= 1.1.0)
chunky_png (1.2.5)
compass (0.12.1)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
fssm (0.2.9)
+ highline (1.6.12)
linguistics (1.0.9)
modular-scale (0.0.5)
compass (>= 0.11.5)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-sftp (2.0.5)
+ net-ssh (>= 2.0.9)
+ net-ssh (2.5.2)
+ net-ssh-gateway (1.1.0)
+ net-ssh (>= 1.99.1)
rake (0.9.2.2)
sass (3.2.0.alpha.244)
PLATFORMS
ruby
DEPENDENCIES
+ capistrano
foundation!
View
@@ -0,0 +1,38 @@
+# 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"
+ run "ln -nfs #{release_path}/images/misc #{release_path}/marketing/images/misc"
+ run "ln -nfs #{release_path}/images/orbit #{release_path}/marketing/images/orbit"
+ 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
View
@@ -20,4 +20,5 @@ Gem::Specification.new do |gem|
gem.add_dependency "linguistics", "~> 1.0.9"
gem.add_dependency "modular-scale", "~> 0.0.5"
gem.add_dependency "rake"
+ gem.add_development_dependency "capistrano"
end

0 comments on commit 12fe243

Please sign in to comment.