diff --git a/app/models/communication/website/page.rb b/app/models/communication/website/page.rb index bb227aba8e955714ff63e9a1e25112116368a5a8..75be9941856d2aefbb194100631c8a8867e8f267 100644 --- a/app/models/communication/website/page.rb +++ b/app/models/communication/website/page.rb @@ -71,15 +71,13 @@ class Communication::Website::Page < ApplicationRecord def publish_to_github return if website&.repository.blank? - data = ApplicationController.render( - template: 'admin/communication/website/pages/jekyll', - layout: false, - assigns: { page: self } - ) - github.publish local_directory: "tmp/pages", - local_file: "#{id}.md", - data: data, - remote_file: "_pages/#{id}.html", - commit_message: "Save page #{ title }" + github.publish kind: :pages, + file: "#{ id }.html", + title: to_s, + data: ApplicationController.render( + template: 'admin/communication/website/pages/jekyll', + layout: false, + assigns: { page: self } + ) end end