mirror of
https://github.com/actions/deploy-pages.git
synced 2026-02-09 03:45:15 +00:00
set output page_url
This commit is contained in:
7
dist/index.js
vendored
7
dist/index.js
vendored
@@ -7062,6 +7062,7 @@ class Deployment {
|
|||||||
this.githubToken = context.githubToken
|
this.githubToken = context.githubToken
|
||||||
this.workflowRun = context.workflowRun
|
this.workflowRun = context.workflowRun
|
||||||
this.requestedDeployment = false
|
this.requestedDeployment = false
|
||||||
|
this.deploymentInfo = null
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
||||||
@@ -7100,6 +7101,7 @@ class Deployment {
|
|||||||
this.requestedDeployment = true
|
this.requestedDeployment = true
|
||||||
core.info(`Created deployment for ${this.buildVersion}`)
|
core.info(`Created deployment for ${this.buildVersion}`)
|
||||||
core.info(JSON.stringify(response.data))
|
core.info(JSON.stringify(response.data))
|
||||||
|
this.deploymentInfo = response.data
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.info(`Failed to create deployment for ${this.buildVersion}.`)
|
core.info(`Failed to create deployment for ${this.buildVersion}.`)
|
||||||
if (error.response && error.response.data) {
|
if (error.response && error.response.data) {
|
||||||
@@ -7113,7 +7115,10 @@ class Deployment {
|
|||||||
// Poll the deployment endpoint for status
|
// Poll the deployment endpoint for status
|
||||||
async check() {
|
async check() {
|
||||||
try {
|
try {
|
||||||
const statusUrl = `https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}`
|
const statusUrl = this.deploymentInfo != null ?
|
||||||
|
this.deploymentInfo["status_url"] :
|
||||||
|
`https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}`
|
||||||
|
core.setOutput('page_url', this.deploymentInfo != null ? this.deploymentInfo["page_url"] : "");
|
||||||
const timeout = core.getInput('timeout')
|
const timeout = core.getInput('timeout')
|
||||||
const reportingInterval = core.getInput('reporting_interval')
|
const reportingInterval = core.getInput('reporting_interval')
|
||||||
const maxErrorCount = core.getInput('error_count')
|
const maxErrorCount = core.getInput('error_count')
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -7062,6 +7062,7 @@ class Deployment {
|
|||||||
this.githubToken = context.githubToken
|
this.githubToken = context.githubToken
|
||||||
this.workflowRun = context.workflowRun
|
this.workflowRun = context.workflowRun
|
||||||
this.requestedDeployment = false
|
this.requestedDeployment = false
|
||||||
|
this.deploymentInfo = null
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
||||||
@@ -7100,6 +7101,7 @@ class Deployment {
|
|||||||
this.requestedDeployment = true
|
this.requestedDeployment = true
|
||||||
core.info(`Created deployment for ${this.buildVersion}`)
|
core.info(`Created deployment for ${this.buildVersion}`)
|
||||||
core.info(JSON.stringify(response.data))
|
core.info(JSON.stringify(response.data))
|
||||||
|
this.deploymentInfo = response.data
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.info(`Failed to create deployment for ${this.buildVersion}.`)
|
core.info(`Failed to create deployment for ${this.buildVersion}.`)
|
||||||
if (error.response && error.response.data) {
|
if (error.response && error.response.data) {
|
||||||
@@ -7113,7 +7115,10 @@ class Deployment {
|
|||||||
// Poll the deployment endpoint for status
|
// Poll the deployment endpoint for status
|
||||||
async check() {
|
async check() {
|
||||||
try {
|
try {
|
||||||
const statusUrl = `https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}`
|
const statusUrl = this.deploymentInfo != null ?
|
||||||
|
this.deploymentInfo["status_url"] :
|
||||||
|
`https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}`
|
||||||
|
core.setOutput('page_url', this.deploymentInfo != null ? this.deploymentInfo["page_url"] : "");
|
||||||
const timeout = core.getInput('timeout')
|
const timeout = core.getInput('timeout')
|
||||||
const reportingInterval = core.getInput('reporting_interval')
|
const reportingInterval = core.getInput('reporting_interval')
|
||||||
const maxErrorCount = core.getInput('error_count')
|
const maxErrorCount = core.getInput('error_count')
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -18,6 +18,7 @@ class Deployment {
|
|||||||
this.githubToken = context.githubToken
|
this.githubToken = context.githubToken
|
||||||
this.workflowRun = context.workflowRun
|
this.workflowRun = context.workflowRun
|
||||||
this.requestedDeployment = false
|
this.requestedDeployment = false
|
||||||
|
this.deploymentInfo = null
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
||||||
@@ -56,6 +57,7 @@ class Deployment {
|
|||||||
this.requestedDeployment = true
|
this.requestedDeployment = true
|
||||||
core.info(`Created deployment for ${this.buildVersion}`)
|
core.info(`Created deployment for ${this.buildVersion}`)
|
||||||
core.info(JSON.stringify(response.data))
|
core.info(JSON.stringify(response.data))
|
||||||
|
this.deploymentInfo = response.data
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.info(`Failed to create deployment for ${this.buildVersion}.`)
|
core.info(`Failed to create deployment for ${this.buildVersion}.`)
|
||||||
if (error.response && error.response.data) {
|
if (error.response && error.response.data) {
|
||||||
@@ -69,7 +71,10 @@ class Deployment {
|
|||||||
// Poll the deployment endpoint for status
|
// Poll the deployment endpoint for status
|
||||||
async check() {
|
async check() {
|
||||||
try {
|
try {
|
||||||
const statusUrl = `https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}`
|
const statusUrl = this.deploymentInfo != null ?
|
||||||
|
this.deploymentInfo["status_url"] :
|
||||||
|
`https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}`
|
||||||
|
core.setOutput('page_url', this.deploymentInfo != null ? this.deploymentInfo["page_url"] : "");
|
||||||
const timeout = core.getInput('timeout')
|
const timeout = core.getInput('timeout')
|
||||||
const reportingInterval = core.getInput('reporting_interval')
|
const reportingInterval = core.getInput('reporting_interval')
|
||||||
const maxErrorCount = core.getInput('error_count')
|
const maxErrorCount = core.getInput('error_count')
|
||||||
|
|||||||
Reference in New Issue
Block a user