mirror of
https://github.com/actions/deploy-pages.git
synced 2025-12-09 00:26:14 +00:00
Swap out the Pages Deployment canceling interaction for the wrapped one from api-client
This commit is contained in:
@@ -192,19 +192,13 @@ class Deployment {
|
|||||||
|
|
||||||
// Cancel the deployment
|
// Cancel the deployment
|
||||||
try {
|
try {
|
||||||
const pagesCancelDeployEndpoint = `${this.githubApiUrl}/repos/${this.repositoryNwo}/pages/deployment/cancel/${this.buildVersion}`
|
const deploymentId = this.deploymentInfo?.id || this.buildVersion
|
||||||
await axios.put(
|
await cancelPagesDeployment({
|
||||||
pagesCancelDeployEndpoint,
|
githubToken: this.githubToken,
|
||||||
{},
|
deploymentId
|
||||||
{
|
})
|
||||||
headers: {
|
core.info(`Canceled deployment with ID ${deploymentId}`)
|
||||||
Accept: 'application/vnd.github.v3+json',
|
|
||||||
Authorization: `Bearer ${this.githubToken}`,
|
|
||||||
'Content-type': 'application/json'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
core.info(`Deployment cancelled with ${pagesCancelDeployEndpoint}`)
|
|
||||||
if (this.deploymentInfo) {
|
if (this.deploymentInfo) {
|
||||||
this.deploymentInfo.pending = false
|
this.deploymentInfo.pending = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user