I encountered the same issue on deploying automatically a bookdown page from the gh-pages
branch with Github Actions:
When I tried to access the url proposed by Github in the GitHub Pages section of the repository settings
https://<username>.github.io/<reponame>/
I got a Error404: Page not found response.
However, manually adding "index.html" at the end of the url displayed the page.
https://<username>.github.io/<reponame>/index.html
Adding manually a CNAME file with the following content to the gh-pages
branch solved the issue permanently:
https://<username>.github.io/<reponame>/index.html
It's more a workaround though...
EDIT:
Adding a CMAKE
file solved the problem only temporarily as it was removed upon invoking the gh actions workflow.
Either:
i) change gh-actions workflow to create the CMAKE
file at the end (still a workaround...)
or how I could solve it in the specific case of using bookdown:
ii) in the YAML header of the index.Rmd file, I added
url: "https://<username>.github.io/<reponame>/"