diff --git a/app/models/deploy_local.rb b/app/models/deploy_local.rb index 339077bb..2cab1a20 100644 --- a/app/models/deploy_local.rb +++ b/app/models/deploy_local.rb @@ -14,6 +14,7 @@ class DeployLocal < Deploy # Sutty def deploy(output: false) return false unless mkdir + return false unless git_lfs(output: output) return false unless yarn(output: output) return false unless pnpm(output: output) return false unless bundle(output: output) @@ -120,6 +121,11 @@ class DeployLocal < Deploy run 'pnpm install --production', output: output end + def git_lfs(output: false) + run %(git lfs fetch), output: output + run %(git lfs checkout), output: output + end + def gem(output: false) run %(gem install bundler --no-document), output: output end diff --git a/app/models/site.rb b/app/models/site.rb index 767de7e6..1231a81d 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -564,6 +564,8 @@ class Site < ApplicationRecord def install_gems return unless persisted? + deploys.find_by_type('DeployLocal').send(:git_lfs) + if !gem_dir? || gemfile_updated? || gemfile_lock_updated? deploys.find_by_type('DeployLocal').send(:bundle) touch