mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 02:46:21 +00:00
feat: métodos de deploy
This commit is contained in:
parent
8ed88a3183
commit
3cf29ebd52
1 changed files with 32 additions and 1 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue