- 
      
- 
        Save Lutscher/3919717 to your computer and use it in GitHub Desktop. 
    Yii Capistrano recipe
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | set :application, "AppName" | |
| set :repository, "[email protected]: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 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment