Permalink
Browse files

Add deployment

  • Loading branch information...
1 parent eb0695c commit 0699078a39a862585397f788449d4e32898adb5c @meltingice committed Nov 22, 2012
Showing with 54 additions and 0 deletions.
  1. +5 −0 Capfile
  2. +47 −0 config/deploy.rb
  3. +1 −0 config/deploy/production.rb
  4. +1 −0 config/deploy/staging.rb
View
@@ -0,0 +1,5 @@
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+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,47 @@
+set :application, 'CamanJS-Site'
+set :use_sudo, false
+set :host, 'camanjs.com'
+set :user, "camanjs_com"
+
+set :stages, %w(staging production)
+set :default_stage, "staging"
+require 'capistrano/ext/multistage'
+
+role :web, host
+role :app, host
+role :db, host, :primary => true
+
+set :group, user
+
+set :deploy_via, :copy
+set :repository, "_site"
+set :scm, :none
+set :copy_compression, :gzip
+
+before 'deploy:update', 'deploy:update_jekyll'
+after 'deploy:update_code', 'deploy:create_symlink'
+
+namespace :deploy do
+
+ desc <<-DESC
+ A macro-task that updates the code and fixes the symlink.
+ DESC
+ task :default do
+ transaction do
+ compile
+ update_code
+ end
+ end
+
+ task :update_code, :except => { :no_release => true } do
+ on_rollback { run "rm -rf #{release_path}; true" }
+ strategy.deploy!
+ end
+
+ desc "Compile the site and CSS. "
+ task :compile do
+ system "rake dev:off"
+ system "rake jekyll:compile"
+ end
+
+end
@@ -0,0 +1 @@
+set :deploy_to, "/home/camanjs_com/public_html"
@@ -0,0 +1 @@
+set :deploy_to, "/home/camanjs_com/subdomains/dev/public_html"

0 comments on commit 0699078

Please sign in to comment.