Skip to content

Instantly share code, notes, and snippets.

@kix
Created October 18, 2012 16:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save kix/3913165 to your computer and use it in GitHub Desktop.
Save kix/3913165 to your computer and use it in GitHub Desktop.
Yii Capistrano recipe
set :application, "AppName"
set :repository, "git@github.com:path/toRepo.git"
set :deploy_to, "/app/appname"
set :deploy_via, :copy
set :stage_dir, "config/stages"
set :current_dir , "www"
set :default_stage, "dev"
set :stages, %w(dev testing prod)
set :use_sudo, false
require 'capistrano/ext/multistage'
set :copy_exclude, [".git", "hgup.php", ".gitignore", ".gitmodules"]
set :scm, :git
# 14Mb archive is not an option, but that's what it takes with submodules enabled
# gotta deploy 'em manually
set :git_enable_submodules, true
set :shared_children, ["framework", "uploads", "assets", "protected/config", "protected/runtime", "protected/extensions", "sphinx"]
after "deploy", "yii:migrate"
namespace :yii do
task :migrate do
# because Yii's own command is an interactive sh*t
run "/usr/bin/env php #{File.join(deploy_to, current_dir, 'protected', 'yiic.php')} wvmigrate"
end
end
@Lutscher
Copy link

viel spaß

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment