Commit 05f5a4a2 authored by Arie Peterson's avatar Arie Peterson 🐚
Browse files

Remove ssh private key from agent after upload in docs CI

parent b0816cca
......@@ -5,6 +5,7 @@
# Run ssh-agent and add ssh key.
eval $(ssh-agent -s)
# Insert ssh private key into ssh agent.
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
# Add server's ssh host key to known hosts.
......@@ -15,6 +16,8 @@ chmod 700 ~/.ssh
[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
# Upload site.
rsync -r --verbose --compress --delete ./_build/html/* \
"${FTP_USER}@ftp.greenhost.nl:${DOMAIN_NAME}/${SUBDOMAIN}"
# Remove ssh key from agent.
ssh-add -D
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment