Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "Get Pages failed" error message more helpful #83

Merged
merged 3 commits into from
Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion dist/index.js
Expand Up @@ -16013,7 +16013,10 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
pageObject = await getPagesSite({ githubToken })
} catch (error) {
if (!enablement) {
core.error('Get Pages site failed', error)
core.error(
'Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the `enablement` parameter for this action.',
error
)
throw error
}
core.warning('Get Pages site failed', error)
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/api-client.js
Expand Up @@ -42,7 +42,10 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
pageObject = await getPagesSite({ githubToken })
} catch (error) {
if (!enablement) {
core.error('Get Pages site failed', error)
core.error(
'Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the `enablement` parameter for this action.',
error
)
throw error
}
core.warning('Get Pages site failed', error)
Expand Down