use different env var

This commit is contained in:
Jess Bees
2022-11-16 12:27:35 -05:00
parent 5c24c29b4d
commit 88e44eb7c2
4 changed files with 5 additions and 5 deletions

4
dist/index.js vendored
View File

@@ -6908,7 +6908,7 @@ function getRequiredVars() {
buildActor: process.env.GITHUB_ACTOR,
actionsId: process.env.GITHUB_ACTION,
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',
isPreview: core.getInput('preview') === 'true'
}
@@ -6995,7 +6995,7 @@ class Deployment {
}
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_URL}`)
core.info(`It should be sent do: ${process.env.GITHUB_API_CUSTOM_URL}`)
const response = await axios.post(pagesDeployEndpoint, payload, {
headers: {
Accept: 'application/vnd.github.v3+json',

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -11,7 +11,7 @@ function getRequiredVars() {
buildActor: process.env.GITHUB_ACTOR,
actionsId: process.env.GITHUB_ACTION,
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',
isPreview: core.getInput('preview') === 'true'
}

View File

@@ -62,7 +62,7 @@ class Deployment {
}
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_URL}`)
core.info(`It should be sent do: ${process.env.GITHUB_API_CUSTOM_URL}`)
const response = await axios.post(pagesDeployEndpoint, payload, {
headers: {
Accept: 'application/vnd.github.v3+json',