fix: shellcheck errors

This commit is contained in:
peaceiris 2019-05-26 22:37:08 +09:00
parent f2d1faaacf
commit 95773e0623

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# setup ssh # setup ssh
if [[ -z "${ACTIONS_DEPLOY_KEY}" ]]; then if [ -z "${ACTIONS_DEPLOY_KEY}" ]; then
echo "error: not found ACTIONS_DEPLOY_KEY" echo "error: not found ACTIONS_DEPLOY_KEY"
exit 1 exit 1
fi fi
@ -11,12 +11,12 @@ echo "${ACTIONS_DEPLOY_KEY}" > /root/.ssh/id_rsa
chmod 400 /root/.ssh/id_rsa chmod 400 /root/.ssh/id_rsa
# push to gh-pages branch # push to gh-pages branch
if [[ -z "${PUBLISH_DIR}" ]]; then if [ -z "${PUBLISH_DIR}" ]; then
echo "error: not found PUBLISH_DIR" echo "error: not found PUBLISH_DIR"
exit 1 exit 1
fi fi
cd ${PUBLISH_DIR} cd "${PUBLISH_DIR}" || exit 1
if [[ -z "${PUBLISH_BRANCH}" ]]; then if [ -z "${PUBLISH_BRANCH}" ]; then
echo "error: not found PUBLISH_BRANCH" echo "error: not found PUBLISH_BRANCH"
exit 1 exit 1
fi fi