deployment_static_deploy
Deploy an uploaded static-site archive (call after the PUT to the uploadUrl from deployment_static_upload_create succeeded).
Deploy an uploaded static-site archive (call after the PUT to the uploadUrl from deployment_static_upload_create succeeded). Runs asynchronously: returns the deployment, then poll deployment_deployment_get with its id. A deployId can be deployed once; a second call is a 409. Publish a pre-built static site (no git repo): 1) deployment_service_create with source: { type: 'static' } (no repo) — once per site; 2) deployment_static_upload_create with the serviceId and format ('tgz' default, or 'zip') — returns uploadUrl, deployId, contentType, expiresAt; 3) within 15 min, curl -X PUT -H 'Content-Type: <contentType>' --upload-file <file> '<uploadUrl>' (the header must be exactly contentType or the PUT is refused); 4) deployment_static_deploy with serviceId and deployId; 5) poll deployment_deployment_get with the deployId until status is Active (or Failed — read lastErrorMessage). The archive root is published as-is; if it has no index.html and holds only one directory (e.g. dist/, macOS __MACOSX/ and .DS_Store ignored), that directory is published instead. Each upload deploys once; for a new version start again from step 2.
Behavior
- HTTP
POST /deployment/services/:serviceId/static/deploy
Arguments
Name | Type | Required | Description |
|---|---|---|---|
deployId | string | • | No description in the catalog. |
serviceId | string | • | No description in the catalog. |
Response
Field | Type | Always | Description |
|---|---|---|---|
id | string | • | |
status | string | • | |
builtAt | string | • | |
trigger | string | • | |
imageRef | string | • | |
commitSha | string | • | |
createdAt | string | • | |
serviceId | string | • | |
startedAt | string | • | |
updatedAt | string | • | |
deployedAt | string | • | |
finishedAt | string | • | |
cloudBuildId | string | • | |
configSnapshot | object | • | |
lastErrorMessage | string | • | |
rolledBackFromDeploymentId | string | • |
Try it
Deploy an uploaded static-site archive (call after the PUT to the uploadUrl from deployment_static_upload_create succeeded).