1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Pretty shell format.

This commit is contained in:
Cotes Chung
2020-09-01 14:54:29 +08:00
parent 252e33b502
commit c473771af4
7 changed files with 50 additions and 88 deletions

View File

@@ -7,7 +7,6 @@
# © 2020 Cotes Chung
# Published under MIT License
set -eu
PAGES_BRANCH="gh-pages"
@@ -28,11 +27,11 @@ backup() {
mv _site "$_backup_dir"
mv .git "$_backup_dir"
# When adding custom domain from Github website,
# When adding custom domain from Github website,
# the CANME only exist on `gh-pages` branch
if [[ -f CNAME ]]; then
if [[ -f CNAME ]]; then
mv CNAME "$_backup_dir"
fi
fi
}
flush() {
@@ -51,7 +50,7 @@ deoply() {
git add -A
git commit -m "[Automation] Site update No.${GITHUB_RUN_NUMBER}"
if [[ $_no_branch = true ]]; then
if $_no_branch; then
git push -u origin "$PAGES_BRANCH"
else
git push -f