Remove print of priv key in ci

This commit is contained in:
Qubasa
2024-05-04 13:31:30 +02:00
parent 5d8ee29ed4
commit 8134583641

View File

@@ -8,7 +8,7 @@
}: }:
writeShellScriptBin "deploy-docs" '' writeShellScriptBin "deploy-docs" ''
set -eux -o pipefail set -eu -o pipefail
export PATH="${ export PATH="${
lib.makeBinPath [ lib.makeBinPath [
coreutils coreutils
@@ -17,6 +17,12 @@ writeShellScriptBin "deploy-docs" ''
] ]
}" }"
#########################################
# #
# DO NOT PRINT THE SSH KEY TO THE LOGS #
# #
#########################################
set +x
if [ -n "''${SSH_HOMEPAGE_KEY:-}" ]; then if [ -n "''${SSH_HOMEPAGE_KEY:-}" ]; then
echo "$SSH_HOMEPAGE_KEY" > ./ssh_key echo "$SSH_HOMEPAGE_KEY" > ./ssh_key
chmod 600 ./ssh_key chmod 600 ./ssh_key
@@ -24,6 +30,13 @@ writeShellScriptBin "deploy-docs" ''
else else
sshExtraArgs= sshExtraArgs=
fi fi
set -x
###########################
# #
# END OF DANGER ZONE #
# #
###########################
rsync \ rsync \
-e "ssh -o StrictHostKeyChecking=no $sshExtraArgs" \ -e "ssh -o StrictHostKeyChecking=no $sshExtraArgs" \