Skip to content

Commit

Permalink
cap: get Capistrano to run yarn install
Browse files Browse the repository at this point in the history
  • Loading branch information
freesteph committed Feb 23, 2021
1 parent aae0d5a commit 2c460e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@

set :keep_releases, 2

before 'deploy:assets:precompile', 'deploy:yarn_install'

after 'deploy:migrate', 'seed'
12 changes: 12 additions & 0 deletions lib/capistrano/tasks/yarn.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

namespace :deploy do
desc 'Run rake yarn install'
task :yarn_install do
on roles(:web) do
within release_path do
execute("cd #{release_path} && yarn install --silent --no-progress --no-audit --no-optional")
end
end
end
end

0 comments on commit 2c460e9

Please sign in to comment.