Update 'update.sh'
This commit is contained in:
parent
6260af3081
commit
0bc0939b9b
11
update.sh
11
update.sh
|
@ -1,22 +1,23 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Comprobar que existe directorio de la web
|
||||||
directorio="$HOME/web"
|
directorio="$HOME/web"
|
||||||
|
|
||||||
if [ "$PWD" != "$directorio" ]
|
if [ "$PWD" != "$directorio" ]
|
||||||
then
|
then
|
||||||
cd "$directorio"
|
cd "$directorio"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Descargar cambios del repositorio principal
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
|
# Actualizar dependencias de Ruby
|
||||||
bundle && bundle update
|
bundle && bundle update
|
||||||
|
|
||||||
|
# Construir el sitio web
|
||||||
JEKYLL_ENV=production bundle exec jekyll build --trace
|
JEKYLL_ENV=production bundle exec jekyll build --trace
|
||||||
|
|
||||||
|
# Subir cambios al repositorio principal
|
||||||
git add Gemfile
|
git add Gemfile
|
||||||
|
|
||||||
git add Gemfile.lock
|
git add Gemfile.lock
|
||||||
|
git commit -m "Actualizar Gemfile y Gemfile.lock"
|
||||||
git commit -m "Actualizar Gemfile.lock"
|
|
||||||
|
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
Loading…
Reference in New Issue