Created
July 14, 2014 15:51
-
-
Save hiroosak/52e0570888134e689398 to your computer and use it in GitHub Desktop.
capistrano3のデプロイを把握する ref: http://qiita.com/taizo/items/afff46a260bd11588962
This file contains 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
$ gem install capistrano | |
$ cap install | |
mkdir -p config/deploy | |
create config/deploy.rb | |
create config/deploy/staging.rb | |
create config/deploy/production.rb | |
mkdir -p lib/capistrano/tasks | |
Capified | |
$ cap staging deploy --dry-run | |
** Invoke staging (first_time) | |
** Execute (dry run) staging | |
** Invoke deploy (first_time) | |
** Execute (dry run) deploy |
This file contains 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
deploy:starting | |
deploy:check | |
#{scm}:check | |
deploy:check:directories | |
deploy:check:linked_dirs | |
deploy:check:make_linked_dirs | |
deploy:check:linked_files | |
deploy:set_previous_revision | |
deploy:started | |
deploy:updating | |
#{scm}:create_release | |
deploy:symlink:shared | |
deploy:symlink:linked_files | |
deploy:symlink:linked_dirs | |
deploy:updated | |
deploy:publishing | |
deploy:symlink:release | |
deploy:published | |
deploy:finishing | |
deploy:cleanup | |
deploy:finished | |
deploy:log_revision |
This file contains 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
deploy:starting | |
deploy:check | |
#{scm}:check | |
deploy:check:directories | |
deploy:check:linked_dirs | |
deploy:check:make_linked_dirs | |
deploy:check:linked_files | |
deploy:set_previous_revision | |
deploy:started | |
deploy:updating | |
#{scm}:create_release | |
deploy:symlink:shared | |
deploy:symlink:linked_files | |
deploy:symlink:linked_dirs | |
deploy:updated | |
deploy:compile_assets # 追加 | |
deploy:assets:precompile # 追加 | |
deploy:assets:backup_manifest # 追加 | |
deploy:normalize_assets # 追加 | |
deploy:publishing | |
deploy:symlink:release | |
deploy:published | |
deploy:finishing | |
deploy:cleanup | |
deploy:finished | |
deploy:log_revision |
This file contains 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
deploy:starting | |
deploy:check | |
#{scm}:check | |
deploy:check:directories | |
deploy:check:linked_dirs | |
deploy:check:make_linked_dirs | |
deploy:check:linked_files | |
deploy:set_previous_revision | |
deploy:started | |
deploy:updating | |
#{scm}:create_release | |
deploy:symlink:shared | |
deploy:symlink:linked_files | |
deploy:symlink:linked_dirs | |
deploy:updated | |
deploy:migrate # 追加 | |
deploy:publishing | |
deploy:symlink:release | |
deploy:published | |
deploy:finishing | |
deploy:cleanup | |
deploy:finished | |
deploy:log_revision |
This file contains 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
deploy:starting | |
deploy:check | |
#{scm}:check | |
deploy:check:directories | |
deploy:check:linked_dirs | |
deploy:check:make_linked_dirs | |
deploy:check:linked_files | |
deploy:set_previous_revision | |
deploy:started | |
deploy:updating | |
#{scm}:create_release | |
deploy:symlink:shared | |
deploy:symlink:linked_files | |
deploy:symlink:linked_dirs | |
npm:install # 追加 | |
deploy:updated | |
deploy:publishing | |
deploy:symlink:release | |
deploy:published | |
deploy:finishing | |
deploy:cleanup | |
deploy:finished | |
deploy:log_revision |
This file contains 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
namespace :npm do | |
desc <<-DESC | |
# 省略 | |
DESC | |
task :install do # npm:install タスクを作成 | |
on roles fetch(:npm_roles) do | |
within fetch(:npm_target_path, release_path) do | |
execute :npm, 'install', fetch(:npm_flags) | |
end | |
end | |
end | |
before 'deploy:updated', 'npm:install' # deploy:updateの前に npm:install を実行する | |
# ... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment