mirror of
https://github.com/actions/deploy-pages.git
synced 2026-02-09 03:45:15 +00:00
Make sure we received a deployment response before setting deploymentInfo
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user