mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-21 01:53:16 +08:00
refactor: Use HOME instead of /root
This commit is contained in:
parent
3ceceb921f
commit
aa82ef0992
@ -21,10 +21,10 @@ if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then
|
|||||||
|
|
||||||
print_info "setup with ACTIONS_DEPLOY_KEY"
|
print_info "setup with ACTIONS_DEPLOY_KEY"
|
||||||
|
|
||||||
mkdir /root/.ssh
|
mkdir "${HOME}/.ssh"
|
||||||
ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts
|
ssh-keyscan -t rsa github.com > "${HOME}/.ssh/known_hosts"
|
||||||
echo "${ACTIONS_DEPLOY_KEY}" > /root/.ssh/id_rsa
|
echo "${ACTIONS_DEPLOY_KEY}" > "${HOME}/.ssh/id_rsa"
|
||||||
chmod 400 /root/.ssh/id_rsa
|
chmod 400 "${HOME}/.ssh/id_rsa"
|
||||||
|
|
||||||
remote_repo="git@github.com:${GITHUB_REPOSITORY}.git"
|
remote_repo="git@github.com:${GITHUB_REPOSITORY}.git"
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ elif [ -n "${PERSONAL_TOKEN}" ]; then
|
|||||||
elif [ -n "${GITHUB_TOKEN}" ]; then
|
elif [ -n "${GITHUB_TOKEN}" ]; then
|
||||||
|
|
||||||
print_info "setup with GITHUB_TOKEN"
|
print_info "setup with GITHUB_TOKEN"
|
||||||
print_error "Do not use GITHUB_TOKEN, See #9"
|
print_error "GITHUB_TOKEN works only private repo, See #9"
|
||||||
|
|
||||||
remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user