From 53937854962a855a0bce00ec7f5da6aab9761582 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Sun, 6 Oct 2019 23:20:05 +0900 Subject: [PATCH] refactor: enhance --- entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 4393592a7..d72e63d71 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -29,6 +29,7 @@ if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then print_info "setup with ACTIONS_DEPLOY_KEY" if [ -n "${SCRIPT_MODE}" ]; then + print_info "run as SCRIPT_MODE" SSH_DIR="${HOME}/.ssh" else SSH_DIR="/root/.ssh" @@ -75,7 +76,7 @@ fi remote_branch="${PUBLISH_BRANCH}" -local_dir="${HOME}/$(tr -cd 'a-f0-9' < /dev/urandom | head -c 32)" +local_dir="${HOME}/ghpages_${RANDOM}" if git clone --depth=1 --single-branch --branch "${remote_branch}" "${remote_repo}" "${local_dir}"; then cd "${local_dir}"