Healthcheck errors when there's no CNAME present
Before submitting an issue, please be sure to
- [x] Read the contributing instructions
- [x] Update to the latest Gem version (run
bundle update github-pages)
This issue affects
- [ ] The site generated by GitHub Pages
- [x] Building sites locally
The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.
What did you do (e.g., steps to reproduce)
Run github-pages health-check in my blog repo.
What did you expect to happen?
No error about missing CNAME, since I've intentionally removed the file to switch from a custom domain to the github.io domain.
What happened instead?
Error: No CNAME file found in current directory
Additional information
The pages-gem will always raise if there's no CNAME. Shouldn't a CNAME be optional as not everyone will be using a custom domain? Perhaps it could be a warning instead.
https://github.com/github/pages-gem/blob/4c74bad4198735f59e48921ae01fe60749d4acc6/bin/github-pages#L46
Ran into this same issue. Using GitHub pages to host so never created a CNAME. Feels like it should be optional.
Same here.
The health-check subcommand specifically tests whether your CNAME is setup properly, hence why it expects one to exist. If you’re using the github.io domain, then there’s no reason to run this command.
Perhaps it could be a warning instead.
Why not change it to a warning?