diff --git a/app/services/concerns/auto_publish_concern.rb b/app/lib/concerns/auto_publish_concern.rb similarity index 100% rename from app/services/concerns/auto_publish_concern.rb rename to app/lib/concerns/auto_publish_concern.rb diff --git a/app/services/site_service.rb b/app/services/site_service.rb index 40f24770..84a5fcf0 100644 --- a/app/services/site_service.rb +++ b/app/services/site_service.rb @@ -40,11 +40,14 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do add_licencias && add_code_of_conduct && add_privacy_policy && - site.index_posts! && deploy end - auto_publish! + if site.persisted? + site.index_posts! + auto_publish! + end + site end