Stage the files GitHub Pages needs, inside the published directory
Source:R/publishing.R
stagePagesFiles.RdA deploy action publishes the contents of the rendered book directory, so anything written to the repository root never reaches the site. Two files have to be in the published directory itself:
Details
.nojekyll, without which GitHub Pages runs the output through Jekyll and drops the_-prefixed directories bookdown emits;CNAME, without which GitHub resets a custom domain to the default*.github.ioaddress on the next deploy.
Writing these at the repository root appears to work for as long as an earlier
deploy left copies behind and the action deploys with clean = false. A
branch published for the first time has neither.