mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 02:01:42 +00:00
avisar cuando falla la compilación
This commit is contained in:
parent
8add50d310
commit
624ed476ca
2 changed files with 15 additions and 2 deletions
|
@ -15,6 +15,9 @@ class DeployJob < ApplicationJob
|
|||
# No es opcional
|
||||
unless @deployed[:deploy_local]
|
||||
@site.update_attribute :status, 'waiting'
|
||||
notify_usuaries
|
||||
|
||||
# Hacer fallar la tarea
|
||||
raise DeployException, deploy_local.build_stats.last.log
|
||||
end
|
||||
|
||||
|
|
|
@ -13,7 +13,12 @@ class DeployLocal < Deploy
|
|||
# Pasamos variables de entorno mínimas para no filtrar secretos de
|
||||
# Sutty
|
||||
def deploy
|
||||
mkdir && yarn && bundle && jekyll_build
|
||||
return false unless mkdir
|
||||
return false unless yarn
|
||||
return false unless gem
|
||||
return false unless bundle
|
||||
|
||||
jekyll_build
|
||||
end
|
||||
|
||||
# Sólo permitimos un deploy local
|
||||
|
@ -49,7 +54,8 @@ class DeployLocal < Deploy
|
|||
{
|
||||
'HOME' => home_dir,
|
||||
'PATH' => paths.join(':'),
|
||||
'JEKYLL_ENV' => Rails.env
|
||||
'JEKYLL_ENV' => Rails.env,
|
||||
'LANG' => ENV['LANG']
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -61,6 +67,10 @@ class DeployLocal < Deploy
|
|||
File.exist? yarn_lock
|
||||
end
|
||||
|
||||
def gem
|
||||
run %(gem install bundler --no-document)
|
||||
end
|
||||
|
||||
# Corre yarn dentro del repositorio
|
||||
def yarn
|
||||
return unless yarn_lock?
|
||||
|
|
Loading…
Reference in a new issue