mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 23:26:21 +00:00
Merge branch 'issue-10464' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
commit
9e13cb5bcb
1 changed files with 18 additions and 4 deletions
|
@ -52,11 +52,13 @@ class DeployDistributedPress < Deploy
|
|||
end
|
||||
end
|
||||
|
||||
self.remote_info[:distributed_press] = c.show(publishing_site).to_h
|
||||
save
|
||||
|
||||
status = c.publish(publishing_site, deploy_local.destination)
|
||||
|
||||
if status
|
||||
self.remote_info[:distributed_press] = c.show(publishing_site).to_h
|
||||
save
|
||||
end
|
||||
|
||||
publisher.logger.close
|
||||
stdout.join
|
||||
end
|
||||
|
@ -78,6 +80,12 @@ class DeployDistributedPress < Deploy
|
|||
|
||||
# Devuelve las URLs de todos los protocolos
|
||||
def urls
|
||||
protocol_urls + gateway_urls
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def gateway_urls
|
||||
remote_info.dig(:distributed_press, :links).values.map do |protocol|
|
||||
[ protocol[:link], protocol[:gateway] ]
|
||||
end.flatten.compact.select do |link|
|
||||
|
@ -85,7 +93,13 @@ class DeployDistributedPress < Deploy
|
|||
end
|
||||
end
|
||||
|
||||
private
|
||||
def protocol_urls
|
||||
remote_info.dig(:distributed_press, :protocols).select do |_, enabled|
|
||||
enabled
|
||||
end.map do |protocol, _|
|
||||
"#{protocol}://#{site.hostname}"
|
||||
end
|
||||
end
|
||||
|
||||
# El cliente de la API
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue