diff --git a/app/models/deploy_local.rb b/app/models/deploy_local.rb index bfde29f7..ee06fa4e 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) @@ -113,6 +114,11 @@ class DeployLocal < Deploy File.exist? pnpm_lock 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 521f298d..24644b9c 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -565,6 +565,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