-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
48 lines (33 loc) · 1.04 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
set -e
printf "\033[0;32m I Love seilylook \033[0m\n"
printf "\033[0;32mDeploying updates to GitHub...\033[0m\n"
printf "\033[0;32mBuild the project.\033[0m\n"
hugo -D
# hugo -t timeline # if using a theme, replace with `hugo -t <YOURTHEME>`
printf "\033[0;32m Go To Public folder \033[0m\n"
cd public
printf "\033[0;32m Setting for submodule commit \033[0m\n"
git config --local user.name "seilylook"
git config --local user.email "seilylook@naver.com"
git submodule update --init --recursive
printf "\033[0;32m Add changes to git. \033[0m\n"
git add .
printf "\033[0;32m Commit changes.. \033[0m\n"
msg="rebuilding site $(date)"
if [ -n "$*" ]; then
msg="$*"
fi
git commit -m "$msg"
printf "\033[0;32m Push blog(presentation) source and build repos. \033[0m\n"
git push origin main
printf "\033[0;32m Come Back up to the Project Root \033[0m\n"
cd ..
echo $pwd
printf "\033[0;32m root repository Commit & Push. \033[0m\n"
git add .
msg="rebuilding site `date`"
if [ $# -eq 1 ]
then msg="$1"
fi
git commit -m "$msg"
git push origin main