mirror of
https://github.com/actions/deploy-pages.git
synced 2026-03-28 08:54:53 +00:00
Compare commits
4 Commits
v2.0.3
...
report-api
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c4a9146cc | ||
|
|
88e44eb7c2 | ||
|
|
5c24c29b4d | ||
|
|
0f34457470 |
7
dist/index.js
vendored
7
dist/index.js
vendored
@@ -6908,7 +6908,7 @@ function getRequiredVars() {
|
|||||||
buildActor: process.env.GITHUB_ACTOR,
|
buildActor: process.env.GITHUB_ACTOR,
|
||||||
actionsId: process.env.GITHUB_ACTION,
|
actionsId: process.env.GITHUB_ACTION,
|
||||||
githubToken: core.getInput('token'),
|
githubToken: core.getInput('token'),
|
||||||
githubApiUrl: process.env.GITHUB_API_URL ?? 'https://api.github.com',
|
githubApiUrl: process.env.GITHUB_API_CUSTOM_URL ?? process.env.GITHUB_API_URL ?? 'https://api.github.com',
|
||||||
artifactName: core.getInput('artifact_name') ?? 'github-pages',
|
artifactName: core.getInput('artifact_name') ?? 'github-pages',
|
||||||
isPreview: core.getInput('preview') === 'true'
|
isPreview: core.getInput('preview') === 'true'
|
||||||
}
|
}
|
||||||
@@ -6994,11 +6994,14 @@ class Deployment {
|
|||||||
payload.preview = true
|
payload.preview = true
|
||||||
}
|
}
|
||||||
core.info(`Creating deployment with payload:\n${JSON.stringify(payload, null, '\t')}`)
|
core.info(`Creating deployment with payload:\n${JSON.stringify(payload, null, '\t')}`)
|
||||||
|
core.info(`Sending payload to: ${pagesDeployEndpoint}`)
|
||||||
|
core.info(`It should be sent do: ${process.env.GITHUB_API_CUSTOM_URL}`)
|
||||||
const response = await axios.post(pagesDeployEndpoint, payload, {
|
const response = await axios.post(pagesDeployEndpoint, payload, {
|
||||||
headers: {
|
headers: {
|
||||||
Accept: 'application/vnd.github.v3+json',
|
Accept: 'application/vnd.github.v3+json',
|
||||||
Authorization: `Bearer ${this.githubToken}`,
|
Authorization: `Bearer ${this.githubToken}`,
|
||||||
'Content-type': 'application/json'
|
'Content-type': 'application/json',
|
||||||
|
Host: 'api.github.com'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.requestedDeployment = true
|
this.requestedDeployment = true
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@ function getRequiredVars() {
|
|||||||
buildActor: process.env.GITHUB_ACTOR,
|
buildActor: process.env.GITHUB_ACTOR,
|
||||||
actionsId: process.env.GITHUB_ACTION,
|
actionsId: process.env.GITHUB_ACTION,
|
||||||
githubToken: core.getInput('token'),
|
githubToken: core.getInput('token'),
|
||||||
githubApiUrl: process.env.GITHUB_API_URL ?? 'https://api.github.com',
|
githubApiUrl: process.env.GITHUB_API_CUSTOM_URL ?? process.env.GITHUB_API_URL ?? 'https://api.github.com',
|
||||||
artifactName: core.getInput('artifact_name') ?? 'github-pages',
|
artifactName: core.getInput('artifact_name') ?? 'github-pages',
|
||||||
isPreview: core.getInput('preview') === 'true'
|
isPreview: core.getInput('preview') === 'true'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,11 +61,14 @@ class Deployment {
|
|||||||
payload.preview = true
|
payload.preview = true
|
||||||
}
|
}
|
||||||
core.info(`Creating deployment with payload:\n${JSON.stringify(payload, null, '\t')}`)
|
core.info(`Creating deployment with payload:\n${JSON.stringify(payload, null, '\t')}`)
|
||||||
|
core.info(`Sending payload to: ${pagesDeployEndpoint}`)
|
||||||
|
core.info(`It should be sent do: ${process.env.GITHUB_API_CUSTOM_URL}`)
|
||||||
const response = await axios.post(pagesDeployEndpoint, payload, {
|
const response = await axios.post(pagesDeployEndpoint, payload, {
|
||||||
headers: {
|
headers: {
|
||||||
Accept: 'application/vnd.github.v3+json',
|
Accept: 'application/vnd.github.v3+json',
|
||||||
Authorization: `Bearer ${this.githubToken}`,
|
Authorization: `Bearer ${this.githubToken}`,
|
||||||
'Content-type': 'application/json'
|
'Content-type': 'application/json',
|
||||||
|
Host: 'api.github.com'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.requestedDeployment = true
|
this.requestedDeployment = true
|
||||||
|
|||||||
Reference in New Issue
Block a user