Following the advice given on the bookdown site, I use Travis-CI to automatically build my bookdown book and push it to
gh-pages. I always forget how to do this, so I’m writing these notes to supplement what is already written there.
- Follow these instructions on GitHub to create a personal access token (PAT)
- Copy the generated PAT to your clipboard
- From the command line and within the root directory of your repository hosting the source of the bookdown, enter the following command:
Note 1: I’m not entirely sure that I need to generate a new PAT for each bookdown repository that I create, but so far this strategy has worked for me. Comments are welcome.
Note 2: that the PAT must be within double quotes. the
--add flag will automatically add the encrypted token to the
Note 3: if you get some error about a bad interpretor, trying re-installing travis: