aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--default.nix16
1 files changed, 3 insertions, 13 deletions
diff --git a/default.nix b/default.nix
index df5b6d7..bb83afc 100644
--- a/default.nix
+++ b/default.nix
@@ -56,24 +56,14 @@ in rec {
'';
};
publishScript = pkgs.writeShellScriptBin "publish.sh" ''
- set -euo pipefail
+ set -eux
SERVER_URL='root@euandre.org'
REMOTE_PATH='/home/user-data/www/default/'
OUT_DOCS='${site}'
- ${pkgs.openssh}/bin/ssh -o StrictHostKeyChecking=no "$SERVER_URL" rm -rf "$REMOTE_PATH/*"
${pkgs.rsync}/bin/rsync -avzP \
--rsh="ssh -o StrictHostKeyChecking=no" \
"$OUT_DOCS/" \
- "$SERVER_URL:$REMOTE_PATH"
- '';
- remotePublishScript = pkgs.writeShellScriptBin "publish.sh" ''
- set -euo pipefail
- SERVER_URL='root@euandre.org'
- REMOTE_PATH='/home/user-data/www/default/'
- OUT_DOCS='${site}'
- ${pkgs.rsync}/bin/rsync -avzP \
- --rsh="ssh -o StrictHostKeyChecking=no" \
- "$OUT_DOCS/" \
- "$SERVER_URL:$REMOTE_PATH"
+ "$SERVER_URL:$REMOTE_PATH" \
+ --delete
'';
}