Last active
February 28, 2017 19:17
-
-
Save swalkinshaw/7fba3ab806cdba974db4ab0083639e61 to your computer and use it in GitHub Desktop.
Sage + Capistrano
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
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
# Includes default deployment tasks | |
require 'capistrano/deploy' | |
# Load tasks from gems | |
require 'capistrano/bower' | |
require 'capistrano/gulp' | |
require 'capistrano/npm' | |
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined. | |
# Customize this path to change the location of your custom tasks. | |
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } |
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
set :application, 'my_app_name' | |
set :repo_url, 'git@example.com:me/my_repo.git' | |
set :branch, :master | |
set :deploy_to, -> { "/srv/www/#{fetch(:application)}" } | |
set :log_level, :info | |
# rest of the usual config | |
set :npm_flags, %w(--silent --no-progress) | |
set :gulp_tasks, '--production' | |
set :gulp_file, -> { release_path.join('path/to/sage/Gulpfile.js') } | |
set :gulp_target_path, -> { release_path.join('path/to/sage') } | |
namespace :deploy do | |
before :updated, 'gulp' | |
end |
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 'capistrano' | |
gem 'capistrano-bower' | |
gem 'capistrano-gulp' | |
gem 'capistrano-npm' |
No wait. It worked later. Possible an i/o error on the machine?! Scratch that either way!
Is this still relevant since it seems 9.0.0-beta.2 uses yarn instead?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excellent. Last one, I hope!
The dependency "tree" on my local/dev machine ends up creating tons of node_modules directories. But in staging, there are many fewer. And then I get dependency errors when the gulp task runs, saying dependent modules weren't found.
Should the staging/prod server configs mean that a different number of node_modules be loaded?? Seems strange.