5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-13 12:04:18 +00:00

feat: métodos de deploy

This commit is contained in:
f 2023-08-30 11:09:08 -03:00
parent 4ade0944de
commit 26f57a8467
No known key found for this signature in database

View file

@ -10,10 +10,41 @@ class DeploySocialDistributedPress < Deploy
# Envía las notificaciones
def deploy(output: false)
with_tempfile(site.private_key_pem) do |file|
run %(bundle exec jekyll notify --trace --key #{file.path} --destination "#{escaped_destination}"), output: output
key = Shellwords.escape file.path
dest = Shellwords.escape destination
run %(bundle exec jekyll notify --trace --key #{key} --destination "#{dest}"), output: output
end
end
# Igual que DeployLocal
#
# @return [String]
def destination
File.join(Rails.root, '_deploy', site.hostname)
end
# Solo uno
#
# @return [Integer]
def limit
1
end
# Espacio ocupado, pero no podemos calcularlo
#
# @return [Integer]
def size
0
end
# El perfil de actor
#
# @return [String,nil]
def url
site.data.dig('activity_pub', 'actor')
end
# Genera la opción de llave privada para jekyll build
#
# @params :args [Hash]