I have a simple bookdown project that is producing both a gitbook and pdf versions of the output. Locally, both work, the output goes to docs, and when I click the download button in the browser I get the pdf version.
When I push to GitHub and set the project pages up to show the docs folder, the gitbook version is there and working fine. However clicking the download pdf button gives a 404 page not found error, and trying to get the pdf directly by appending the filename to the URL doesn't work either. The file _main.pdf is in the docs folder in the repo.
I'm currently specifying the download option in _output.yml as
When your website is not built with Github Pages, you must present a
.nojekyll file (see bookdown's documentation).
If it still does not work, it might be a bug of Github Pages to me (files with names starting with underscores are not well supported for some reason). In your _bookdown.yml, you can add an option to change the filename, e.g.