- Check for both .next (Next.js) and dist (Vite/other) directories
- Copy .next and public assets for Next.js builds
- Fallback to dist directory for other build tools
- Fixes build verification for @edr/passenger-backoffice Next.js app
- Increase fetch-timeout to 120 seconds (default was likely 30s)
- Set retry min/max timeouts to handle transient network issues
- Increase fetch-retries to 5 (from default 2)
- Add NODE_OPTIONS with increased heap size to prevent OOM during build
- Resolves intermittent timeout failures when downloading Google Fonts and other CDN resources
- Verify dist directory exists after build completes
- Provides better error messaging if build outputs are missing
- Prevents silent failures that result in empty COPY commands