-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
The vercel.deployments.createDeployment does not support preview
as a deployment type, only production
and staging
.
How to trigger a vercel deployment for a branch using the preview environment?
const response = await vercel.deployments.createDeployment({
teamId: "vercel-org",
requestBody: {
name: "vercel-project",
target: 'preview',
gitSource: {
type: 'github',
ref: "feat/new-ui",
repo: "my-repo",
org: "my-org",
},
},
});
Errors with: Invalid request:
target should be 'production', 'staging', or a custom environment identifier.
The type param does not support preview
/**
* Either not defined, `staging`, `production`, or a custom environment identifier. If `staging`, a staging alias in the format `<project>-<team>.vercel.app` will be assigned. If `production`, any aliases defined in `alias` will be assigned. If omitted, the target will be `preview`.
*/
target?: string | undefined;
https://github.com/vercel/sdk/blob/main/src/models/createdeploymentop.ts#L384
Metadata
Metadata
Assignees
Labels
No labels