ci: add verbose logging and cache cleanup for debugging

Add comprehensive debug output to CI build step to diagnose
build failures:
- Log Node.js and npm versions
- Check node_modules state
- Clean cache directories before build
- Capture full build output to build.log

This will help identify the root cause of CI build failures.
This commit is contained in:
张翔
2026-03-30 11:01:26 +08:00
parent 8b7cc15362
commit 1e2e04c5de
+11 -2
View File
@@ -123,9 +123,18 @@ steps:
- lint
- type-check
commands:
- echo "=== Debug: Environment info ==="
- node --version
- npm --version
- echo "=== Debug: Checking node_modules ==="
- ls -la node_modules/ | head -20
- echo "=== Debug: Cleaning cache ==="
- rm -rf node_modules/.cache
- rm -rf .next
- rm -rf dist
- echo "Building production artifacts"
- npm run build
- echo "Build completed"
- npm run build 2>&1 | tee build.log
- echo "=== Debug: Build completed ==="
- ls -la dist/
- echo "Deploying to production"
- mkdir -p ~/.ssh