2021-01-07 23:58:41 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-07-22 02:23:49 +02:00
|
|
|
# Comprobar que existe directorio de la web
|
2021-01-08 00:05:00 +01:00
|
|
|
directorio="$HOME/web"
|
2021-01-08 00:06:09 +01:00
|
|
|
if [ "$PWD" != "$directorio" ]
|
2021-01-07 23:58:41 +01:00
|
|
|
then
|
|
|
|
cd "$directorio"
|
|
|
|
fi
|
|
|
|
|
2021-07-22 02:23:49 +02:00
|
|
|
# Descargar cambios del repositorio principal
|
2021-01-08 21:15:32 +01:00
|
|
|
git pull
|
2021-01-07 23:58:41 +01:00
|
|
|
|
2021-07-22 02:23:49 +02:00
|
|
|
# Actualizar dependencias de Ruby
|
2021-01-08 21:15:32 +01:00
|
|
|
bundle && bundle update
|
2021-01-07 23:58:41 +01:00
|
|
|
|
2021-07-22 02:23:49 +02:00
|
|
|
# Construir el sitio web
|
2021-01-08 21:15:32 +01:00
|
|
|
JEKYLL_ENV=production bundle exec jekyll build --trace
|
2021-07-21 06:04:20 +02:00
|
|
|
|
2021-07-22 02:23:49 +02:00
|
|
|
# Subir cambios al repositorio principal
|
2021-07-21 06:12:40 +02:00
|
|
|
git add Gemfile
|
2021-07-21 06:04:20 +02:00
|
|
|
git add Gemfile.lock
|
2021-07-22 02:23:49 +02:00
|
|
|
git commit -m "Actualizar Gemfile y Gemfile.lock"
|
2021-07-21 06:04:20 +02:00
|
|
|
git push origin main
|