5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 04:36:20 +00:00

feat: métodos de deploy

This commit is contained in:
f 2023-08-30 11:09:08 -03:00
parent 8ed88a3183
commit 3cf29ebd52

View file

@ -10,10 +10,41 @@ class DeploySocialDistributedPress < Deploy
# Envía las notificaciones # Envía las notificaciones
def deploy(output: false) def deploy(output: false)
with_tempfile(site.private_key_pem) do |file| 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
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 # Genera la opción de llave privada para jekyll build
# #
# @params :args [Hash] # @params :args [Hash]