Add custom deploy and logs env for next-deploy (#89206)
## Summary Adds support for custom deploy scripts in the `next-deploy` test mode via two new environment variables: - `NEXT_TEST_DEPLOY_SCRIPT_PATH` - Path to a custom script that deploys the project and outputs the deployment URL to stdout - `NEXT_TEST_DEPLOY_LOGS_SCRIPT_PATH` - Path to a custom script that fetches build logs (required when using custom deploy script) This allows running deploy tests against non-Vercel deployment targets. ### Priority Order 1. `NEXT_TEST_DEPLOY_URL` - If set, uses existing deployment (no deploy happens) 2. `NEXT_TEST_DEPLOY_SCRIPT_PATH` - If set, uses custom deploy script 3. Default Vercel CLI logic - If neither is set ### Script Interface **Deploy script** receives: - `NEXT_TEST_DIR` - The test directory containing the Next.js project - All test-specific environment variables - Must output deployment URL to stdout **Logs script** receives: - `NEXT_TEST_DIR` - The test directory - `NEXT_TEST_DEPLOY_URL` - The deployment URL - Must output build logs containing `BUILD_ID: <id>` pattern Verified existing flow is still working in: https://github.com/vercel/next.js/actions/runs/21465304133
Showing
This diff is collapsed.
Please
register
or
sign in
to comment