diff options
author | EuAndreh <eu@euandre.org> | 2020-12-19 09:11:01 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-12-19 12:24:05 -0300 |
commit | 4992eb1e3f7b29eb99e35417853c577bc750a77c (patch) | |
tree | 5462a1818078106e8974b93e37045857923b9b5a /default.nix | |
parent | Move images/ -> static/ (diff) | |
download | euandre.org-4992eb1e3f7b29eb99e35417853c577bc750a77c.tar.gz euandre.org-4992eb1e3f7b29eb99e35417853c577bc750a77c.tar.xz |
default.nix: Use --delete option when publishing
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 16 |
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 ''; } |