-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild
executable file
·38 lines (34 loc) · 907 Bytes
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Script para guardar el sitio estático generado en la rama gh-pages
echo "*****************************"
echo "Generando el sitio estático"
echo "*****************************"
mkdocs build
sleep 1
echo "[OK]"
echo "*************************************"
echo "Guardando cambios en la rama master"
echo "*************************************"
sleep 1
echo "[OK]"
git checkout master
git add .
git commit -m "`date`"
git push origin master
echo "*************************************"
echo "Guardando cambios en la rama gh-pages"
echo "*************************************"
sleep 1
git checkout gh-pages
git checkout master -- site
git add site
cp -a site/* .
git add .
git commit -m "`date`"
git push origin gh-pages
git checkout master
echo "[OK]"
echo "*************************************"
echo "Tareas realizadas exitosamente!"
echo "*************************************"
sleep 1