Merge branch 'main' into patch-1

This commit is contained in:
James M. Greene
2022-11-30 10:33:09 -06:00
committed by GitHub
8 changed files with 22 additions and 16 deletions

View File

@@ -21,10 +21,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Set Node.js 16.x - name: Set Node.js 16.x
uses: actions/setup-node@v1 uses: actions/setup-node@v3
with: with:
node-version: 16.x node-version: 16.x

View File

@@ -24,7 +24,7 @@ jobs:
steps: steps:
- name: Update the ${{ env.TAG_NAME }} tag - name: Update the ${{ env.TAG_NAME }} tag
id: update-major-tag id: update-major-tag
uses: actions/publish-action@v0.1.0 uses: actions/publish-action@v0.2.1
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set Node.JS - name: Set Node.JS
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: 16.x node-version: 16.x

7
dist/index.js vendored
View File

@@ -6909,7 +6909,8 @@ function getRequiredVars() {
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_URL ?? 'https://api.github.com',
artifactName: core.getInput('artifact_name') ?? 'github-pages', githubServerUrl: process.env.GITHUB_SERVER_URL ?? 'https://github.com',
artifactName: core.getInput('artifact_name') || 'github-pages',
isPreview: core.getInput('preview') === 'true' isPreview: core.getInput('preview') === 'true'
} }
} }
@@ -6957,6 +6958,7 @@ class Deployment {
this.requestedDeployment = false this.requestedDeployment = false
this.deploymentInfo = null this.deploymentInfo = null
this.githubApiUrl = context.githubApiUrl this.githubApiUrl = context.githubApiUrl
this.githubServerUrl = context.githubServerUrl
this.artifactName = context.artifactName this.artifactName = context.artifactName
this.isPreview = context.isPreview === true this.isPreview = context.isPreview === true
} }
@@ -7027,7 +7029,8 @@ class Deployment {
} else if (error.response.status == 403) { } else if (error.response.status == 403) {
errorMessage += `Ensure GITHUB_TOKEN has permission "pages: write".` errorMessage += `Ensure GITHUB_TOKEN has permission "pages: write".`
} else if (error.response.status == 404) { } else if (error.response.status == 404) {
errorMessage += `Ensure GitHub Pages has been enabled.` const pagesSettingsUrl = `${this.githubServerUrl}/${this.repositoryNwo}/settings/pages`
errorMessage += `Ensure GitHub Pages has been enabled: ${pagesSettingsUrl}`
} else if (error.response.status >= 500) { } else if (error.response.status >= 500) {
errorMessage += `Server error, is githubstatus.com reporting a Pages outage? Please re-run the deployment at a later time.` errorMessage += `Server error, is githubstatus.com reporting a Pages outage? Please re-run the deployment at a later time.`
} }

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

12
package-lock.json generated
View File

@@ -4767,9 +4767,9 @@
} }
}, },
"node_modules/minimatch": { "node_modules/minimatch": {
"version": "3.0.4", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
@@ -9694,9 +9694,9 @@
"dev": true "dev": true
}, },
"minimatch": { "minimatch": {
"version": "3.0.4", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true, "dev": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"

View File

@@ -12,7 +12,8 @@ function getRequiredVars() {
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_URL ?? 'https://api.github.com',
artifactName: core.getInput('artifact_name') ?? 'github-pages', githubServerUrl: process.env.GITHUB_SERVER_URL ?? 'https://github.com',
artifactName: core.getInput('artifact_name') || 'github-pages',
isPreview: core.getInput('preview') === 'true' isPreview: core.getInput('preview') === 'true'
} }
} }

View File

@@ -24,6 +24,7 @@ class Deployment {
this.requestedDeployment = false this.requestedDeployment = false
this.deploymentInfo = null this.deploymentInfo = null
this.githubApiUrl = context.githubApiUrl this.githubApiUrl = context.githubApiUrl
this.githubServerUrl = context.githubServerUrl
this.artifactName = context.artifactName this.artifactName = context.artifactName
this.isPreview = context.isPreview === true this.isPreview = context.isPreview === true
} }
@@ -94,7 +95,8 @@ class Deployment {
} else if (error.response.status == 403) { } else if (error.response.status == 403) {
errorMessage += `Ensure GITHUB_TOKEN has permission "pages: write".` errorMessage += `Ensure GITHUB_TOKEN has permission "pages: write".`
} else if (error.response.status == 404) { } else if (error.response.status == 404) {
errorMessage += `Ensure GitHub Pages has been enabled.` const pagesSettingsUrl = `${this.githubServerUrl}/${this.repositoryNwo}/settings/pages`
errorMessage += `Ensure GitHub Pages has been enabled: ${pagesSettingsUrl}`
} else if (error.response.status >= 500) { } else if (error.response.status >= 500) {
errorMessage += `Server error, is githubstatus.com reporting a Pages outage? Please re-run the deployment at a later time.` errorMessage += `Server error, is githubstatus.com reporting a Pages outage? Please re-run the deployment at a later time.`
} }