-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·25 lines (23 loc) · 2.14 KB
/
deploy.sh
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
CURR_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ $CURR_BRANCH != "gh-pages" ]; then
echo "Você precisa estar no branch 'gh-pages' para fazer o deploy do site";
exit 1
fi
git checkout main -- public/
git restore --staged .
rsync -avzP public/* .
rm -rf public/
git add .
echo " ▄▄▄▄███▄▄▄▄ ▄████████ ███ ▄████████ ▄████████ ▄█ ▄██████▄ ▄██████▄
▄██▀▀▀███▀▀▀██▄ ███ ███ ▀█████████▄ ███ ███ ███ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ ▀███▀▀██ ███ █▀ ███ █▀ ███ ███ ███ ███ █▀
███ ███ ███ ███ ███ ███ ▀ ▄███▄▄▄ ▄███▄▄▄ ███ ███ ███ ▄███
███ ███ ███ ▀███████████ ███ ▀▀███▀▀▀ ▀▀███▀▀▀ ███ ███ ███ ▀▀███ ████▄
███ ███ ███ ███ ███ ███ ███ █▄ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ ███ ███ ███ ███ ███▌ ▄ ███ ███ ███ ███
▀█ ███ █▀ ███ █▀ ▄████▀ ██████████ ███ █████▄▄██ ▀██████▀ ████████▀
▀
"
echo "Para publicar o site, revise as alterações com \`git status\` e,
se estiver ok, faça um commit e suba-o com \`git push\`"
exit 0