Add a support note to the deployment creation error if using GHES

This commit is contained in:
James M. Greene
2023-05-16 10:13:05 -05:00
parent 6b39486d2c
commit b26c4cb790
4 changed files with 12 additions and 2 deletions

5
dist/index.js generated vendored
View File

@@ -10092,6 +10092,11 @@ class Deployment {
} else if (error.status === 404) {
const pagesSettingsUrl = `${this.githubServerUrl}/${this.repositoryNwo}/settings/pages`
errorMessage += `Ensure GitHub Pages has been enabled: ${pagesSettingsUrl}`
// If using GHES, add a special note about compatibility
if (new URL(this.githubServerUrl).hostname.toLowerCase() !== 'github.com') {
errorMessage +=
'.\nNote: This action version may not yet support GitHub Enterprise Server, please check the compatibility table.'
}
} else if (error.status >= 500) {
errorMessage +=
'Server error, is githubstatus.com reporting a Pages outage? Please re-run the deployment at a later time.'