diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 86935aab..1d59f415 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -299,6 +299,13 @@ jobs: find . -maxdepth 3 -name '*.tsbuildinfo' -delete 2>/dev/null || true rm -rf .output dist .next .next/types .next/dev + # Restore build cache from last deploy so Turbopack can do + # incremental compilation (much faster rebuilds). + if [ -d "${LIVE}/.next/cache" ]; then + mkdir -p .next/cache + cp -r "${LIVE}/.next/cache/." .next/cache/ + fi + # Stage shares MySQL with the live app + emulator. Keep the stage pool # tiny so install/test/build cannot exhaust max_connections. export DATABASE_POOL_SIZE="${DEPLOY_DATABASE_POOL_SIZE:-5}"