Skip to content

Instantly share code, notes, and snippets.

@bobbysciacchitano
Created October 15, 2014 10:45
Show Gist options
  • Save bobbysciacchitano/1bf0a9db326c7e9fb448 to your computer and use it in GitHub Desktop.
Save bobbysciacchitano/1bf0a9db326c7e9fb448 to your computer and use it in GitHub Desktop.
Ember-CLI Capistrano deploy
# Move config files to prevent conflicts with project
set :deploy_config_path, 'deploy/config/deploy.rb'
set :stage_config_path, 'deploy/config/deploy'
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
# Includes tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
# https://github.com/capistrano/rvm
# https://github.com/capistrano/rbenv
# https://github.com/capistrano/chruby
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
#
# require 'capistrano/rvm'
# require 'capistrano/rbenv'
# require 'capistrano/chruby'
# require 'capistrano/bundler'
# require 'capistrano/rails/assets'
# require 'capistrano/rails/migrations'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('deploy/lib/capistrano/tasks/*.rake').each { |r| import r }
namespace :node do
desc 'Install node modules'
task :npm_install do
on roles(:static) do
execute "cd #{release_path} && npm install"
end
end
desc 'Install bower components'
task :bower_install do
on roles(:static) do
execute "cd #{release_path} && bower install"
end
end
end
namespace :ember do
desc 'Build Ember Application'
task :build do
on roles(:static) do
execute "cd #{release_path} && ember build --environment production"
end
end
end
namespace :node do
desc 'Install node modules'
task :npm_install do
on roles(:static) do
execute "cd #{release_path} && npm install"
end
end
desc 'Install bower components'
task :bower_install do
on roles(:static) do
execute "cd #{release_path} && bower install"
end
end
end
@siriniok
Copy link

Wow, thank you so much!

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