diff --git a/system/hosts/mcp/static-site-hooks.nix b/system/hosts/mcp/static-site-hooks.nix index c66297f..f57486e 100644 --- a/system/hosts/mcp/static-site-hooks.nix +++ b/system/hosts/mcp/static-site-hooks.nix @@ -22,13 +22,14 @@ let gitFull nodejs_22 bashNonInteractive + rsync ]; text = '' set -e id pwd - output_dir=$(date --utc --iso-8601=seconds) + output_dir="./$(date --utc --iso-8601=seconds)" export GIT_SSH_COMMAND='ssh -v -o "UserKnownHostsFile ${gitKnownHosts}" -i "${ config.sops.secrets."deploy-key/mcp".path @@ -46,7 +47,8 @@ let # Use a local cache with --cache .npm npm ci --cache .npm npm run build -- --outDir "$output_dir" - ln -s "$output_dir" deployed + # Trailing slash on source to only copy contents, not the directory itself + rsync --archive --delete "$output_dir"/ deployed ''; }; in