[Webkooks] Switches the NPM deploy to rsync the directory instead of link it because docker will follow the link and then not update.

This commit is contained in:
2025-07-31 17:09:56 -07:00
parent 3b46856b66
commit cf4d54ebfd

View File

@@ -22,13 +22,14 @@ let
gitFull gitFull
nodejs_22 nodejs_22
bashNonInteractive bashNonInteractive
rsync
]; ];
text = '' text = ''
set -e set -e
id id
pwd 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 "${ export GIT_SSH_COMMAND='ssh -v -o "UserKnownHostsFile ${gitKnownHosts}" -i "${
config.sops.secrets."deploy-key/mcp".path config.sops.secrets."deploy-key/mcp".path
@@ -46,7 +47,8 @@ let
# Use a local cache with --cache .npm # Use a local cache with --cache .npm
npm ci --cache .npm npm ci --cache .npm
npm run build -- --outDir "$output_dir" 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 in