If you mean you would like to use GitHub pages to publish or deploy your bookdown
project and:
a) you would like to place the rendered book (i.e., the folder _book
is not in your .gitignore
file) on GitHub
b) further, you are OK with placing your rendered book in a folder on your "master" GitHub branch
c) even further, you are OK with using a project domain name like http(s)://<username>.github.io/<projectname>
Then you can take advantage of a neat trick with GitHub pages which allows you publish to GH pages from the master branch /docs
folder. To do that:
- Configure source for GH pages through GitHub website as master branch
/docs
folder - Go to your
_bookdown.yml
file and addoutput_dir: "docs"
on a line by itself - Serve/preview your book locally
- Push to GitHub, you should see it there.