URL: https://github.com/rzr/url-action
Check availability of a website useful to tell if gh-pages are enabled by running curl
For demos, check status of open PRs:
https://github.com/rzr/url-action/pulls
Usage is straightforward check sample file:
It just probe availability of URL using curl command.
if url parameter is omitted, then by default action will check if project has a github page online.
An other more advanced recipe that attempt to deploy to gh-pages,
.github/workflows/gh-pages.yaml
If URL of github-page is not available, it is assumed that gh-pages is not enabled then it will just bypass and make the workflow successful.
For the record i made it to prevent deploying to gh-pages, when forking projects that have this feature enabled.
Typical observed issue when using actions/deploy-pages@v4
Fetching artifact metadata for "github-pages" in this workflow run
Found 3 artifact(s)
Creating Pages deployment with payload:
(...)
Error: Creating Pages deployment failed
Error: HttpError: Not Found
(...)
Error: Error: Failed to create deployment (status: 404) with build version BADC0DE. Request ID ...
Ensure GitHub Pages has been enabled: https://github.com/.../.../settings/pages
Forward error code on to an other URL, see examples workflows .
API is intentionally not yet documented until a major version is released.
- https://github.com/marketplace/actions/url-action
- http://rzr.github.io/url-action
- actions/deploy-pages#386 (comment)
- actions/upload-pages-artifact#6 (comment)
- https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action
- https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs
- https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
- https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions
- https://www.rfc-editor.org/rfc/rfc7033
- https://en.wikipedia.org/wiki/Webhook
- https://github.com/standard-webhooks/standard-webhooks/