fix(deploy): publish without rsync (rm + cp fallback)
Made-with: Cursor
This commit is contained in:
parent
b523b67587
commit
20cabdd038
6
scripts/deploy-site.sh
Normal file → Executable file
6
scripts/deploy-site.sh
Normal file → Executable file
@ -28,7 +28,13 @@ npm run build
|
||||
|
||||
if [[ -d "$SITE_ROOT" ]]; then
|
||||
echo "==> Publish dist/ -> $SITE_ROOT/"
|
||||
if command -v rsync >/dev/null 2>&1; then
|
||||
rsync -av --delete "${REPO_ROOT}/dist/" "${SITE_ROOT}/"
|
||||
else
|
||||
echo " (rsync not installed — using rm + cp; install rsync for faster syncs: apt-get install -y rsync)"
|
||||
find "$SITE_ROOT" -mindepth 1 -exec rm -rf {} +
|
||||
cp -a "${REPO_ROOT}/dist/." "$SITE_ROOT/"
|
||||
fi
|
||||
echo "==> Done. Reload nginx if needed: systemctl reload nginx"
|
||||
else
|
||||
echo "WARN: SITE_ROOT '$SITE_ROOT' is not a directory — not copying dist."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user