Skip to content

Commit

Permalink
refactor: enhance
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Oct 6, 2019
1 parent 61ffdec commit 5393785
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}"

Expand Down

0 comments on commit 5393785

Please sign in to comment.