diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 3a56be6..20333c0 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -22,7 +22,10 @@ DEPLOY_USER="${DEPLOY_USER:-ubuntu}" DEPLOY_PATH="${DEPLOY_PATH:-/var/www/aramland-admin}" DEPLOY_PASSWORD="${DEPLOY_PASSWORD:-}" -echo "▸ Building locally…" +echo "▸ Building locally (clean)…" +# Remove caches so the production build never type-checks a stale `.next/dev` +# validator (tsconfig includes .next/dev/types) and never ships stale out/ files. +rm -rf .next out npm run build if [ ! -d out ]; then