Skip to content

Commit

Permalink
Fix production asset compilation within container build (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdavidhamilton authored Oct 25, 2023
1 parent 180edde commit 2680635
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,15 @@ def dashboard?
Types::Params::Bool[ENV.fetch('DASHBOARD_UPDATE', true)]
end

# CI workflow uses DELIVERY
# CMS validation workflow uses PREVIEW then DELIVERY
#
# @see ContentfulRails.configuration.enable_preview_domain
# @see ContentfulModel.use_preview_api
#
# @return [Boolean]
def preview?
if Rails.env.test? && ENV['CONTENTFUL_PREVIEW'].blank?
false
else
if defined?(::Types)
Types::Params::Bool[ENV.fetch('CONTENTFUL_PREVIEW', false)]
else
false
end
end

Expand Down

0 comments on commit 2680635

Please sign in to comment.