diff --git a/Makefile b/Makefile index 977d562..4a1661b 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ ci-deploy: ## Deploy from CI/CD. Only call from within CI git config --global user.email "${CI_COMMIT_AUTHOR_EMAIL}" git config --global user.name "${CI_COMMIT_AUTHOR}" ./scripts/zola.sh deploy pages public "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>" - ./scripts/ci.sh --init ${HOSTEA_WRITE_DEPLOY_KEY} + ./scripts/ci.sh --init "$$HOSTEA_WRITE_DEPLOY_KEY" ./scripts/ci.sh --deploy ${PAGES_DEPLOY_SECRET} pages ./scripts/ci.sh --clean diff --git a/scripts/ci.sh b/scripts/ci.sh index 4c9f540..a8136c7 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -46,7 +46,8 @@ EOF # $1: SSH private key write_ssh(){ - echo $1 > $SSH_ID_FILE + echo > $SSH_ID_FILE + echo "$1" >> $SSH_ID_FILE } set_ssh_remote() { @@ -98,7 +99,7 @@ then exit -1 fi set_ssh_remote - write_ssh $2 + write_ssh "$2" elif match_arg $1 '-c' '--clean' then clean