pages-gem icon indicating copy to clipboard operation
pages-gem copied to clipboard

Healthcheck errors when there's no CNAME present

Open dideler opened this issue 7 years ago • 4 comments

Before submitting an issue, please be sure to

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

dideler avatar May 28 '18 17:05 dideler

Ran into this same issue. Using GitHub pages to host so never created a CNAME. Feels like it should be optional.

MattRugamas avatar Dec 18 '18 00:12 MattRugamas

Same here.

kmsheng avatar Dec 06 '19 09:12 kmsheng

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.

parkr avatar Dec 06 '19 15:12 parkr

Perhaps it could be a warning instead.

Why not change it to a warning?

Freed-Wu avatar Oct 16 '22 08:10 Freed-Wu