File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 3
3
# Force-push the built HTML to the `gh-pages` branch.
4
4
#
5
5
6
- set -e
6
+ set -eu
7
7
8
8
DEPLOY_DIR=~ /project
9
9
10
10
# trust GitHub server keys
11
- if [ ! -d ~ /.ssh/ ]; then
11
+ if [[ ! -d ~ /.ssh/ ] ]; then
12
12
mkdir ~ /.ssh/
13
13
fi
14
14
ssh-keyscan github.com >> ~ /.ssh/known_hosts
15
15
16
16
# stage generated HTML for GitHub Pages
17
- git clone --quiet --branch=gh-pages $CIRCLE_REPOSITORY_URL $DEPLOY_DIR
18
- rsync --archive --recursive --verbose --remove-source-files $HOME /hugo/$CIRCLE_PROJECT_REPONAME /public/* $DEPLOY_DIR
17
+ git clone --quiet --branch=gh-pages " $CIRCLE_REPOSITORY_URL " " $DEPLOY_DIR "
18
+ rsync --archive --recursive --verbose --remove-source-files $HOME /hugo/$CIRCLE_PROJECT_REPONAME /public/* " $DEPLOY_DIR "
19
19
20
20
# git client setup
21
- cd $DEPLOY_DIR
21
+ cd " $DEPLOY_DIR "
22
22
git config --global push.default simple
23
- git config --global user.email $( git --no-pager show --no-patch --format=' %ae' HEAD)
23
+ git config --global user.email " $( git --no-pager show --no-patch --format=' %ae' HEAD) "
24
24
if [ -n $CIRCLE_USERNAME ]; then
25
- git config --global user.name $CIRCLE_USERNAME
25
+ git config --global user.name " $CIRCLE_USERNAME "
26
26
else
27
27
git config --global user.name " Committer not registered on CircleCI"
28
28
fi
You can’t perform that action at this time.
0 commit comments