mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-20 17:43:18 +08:00
feat: Add SCRIPT_MODE
This commit is contained in:
parent
64e2296d31
commit
61ffdece86
@ -28,10 +28,15 @@ if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then
|
||||
|
||||
print_info "setup with ACTIONS_DEPLOY_KEY"
|
||||
|
||||
mkdir "${HOME}/.ssh"
|
||||
ssh-keyscan -t rsa github.com > "${HOME}/.ssh/known_hosts"
|
||||
echo "${ACTIONS_DEPLOY_KEY}" > "${HOME}/.ssh/id_rsa"
|
||||
chmod 400 "${HOME}/.ssh/id_rsa"
|
||||
if [ -n "${SCRIPT_MODE}" ]; then
|
||||
SSH_DIR="${HOME}/.ssh"
|
||||
else
|
||||
SSH_DIR="/root/.ssh"
|
||||
fi
|
||||
mkdir "${SSH_DIR}"
|
||||
ssh-keyscan -t rsa github.com > "${SSH_DIR}/known_hosts"
|
||||
echo "${ACTIONS_DEPLOY_KEY}" > "${SSH_DIR}/id_rsa"
|
||||
chmod 400 "${SSH_DIR}/id_rsa"
|
||||
|
||||
remote_repo="git@github.com:${PUBLISH_REPOSITORY}.git"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user