23 lines
484 B
Bash
Executable file
23 lines
484 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Comprobar que existe directorio de la web
|
|
directorio="$HOME/web"
|
|
if [ "$PWD" != "$directorio" ]
|
|
then
|
|
cd "$directorio"
|
|
fi
|
|
|
|
# Descargar cambios del repositorio principal
|
|
git pull
|
|
|
|
# Actualizar dependencias de Ruby
|
|
bundle && bundle update
|
|
|
|
# Construir el sitio web
|
|
JEKYLL_ENV=production bundle exec jekyll build --trace
|
|
|
|
# Subir cambios al repositorio principal
|
|
git add Gemfile
|
|
git add Gemfile.lock
|
|
git commit -m "Actualizar Gemfile y Gemfile.lock"
|
|
git push origin main
|