diff --git a/src/deployment.js b/src/deployment.js index 6cc8714..ab94229 100644 --- a/src/deployment.js +++ b/src/deployment.js @@ -62,13 +62,17 @@ class Deployment { idToken, isPreview: this.isPreview }) - this.deploymentInfo = { - ...deployment, - id: deployment?.id || deployment?.['status_url']?.split('/')?.pop() || this.buildVersion, - pending: true + + if (deployment) { + this.deploymentInfo = { + ...deployment, + id: deployment?.id || deployment?.['status_url']?.split('/')?.pop() || this.buildVersion, + pending: true + } } - core.info(`Created deployment for ${this.buildVersion}, ID: ${this.deploymentInfo.id}`) + core.info(`Created deployment for ${this.buildVersion}, ID: ${this.deploymentInfo?.id}`) + core.debug(JSON.stringify(deployment)) return deployment