I've got a Bookdown book for which I'd like to build a GitBook site as well as PDF and EPUB downloads. I will use Travis to build all 3 outputs, and the PDF and EPUB will be available for download from the GitBook site.
The bookdown-demo calls bookdown::render_book once for each output in _build.sh.
However, according to the logs in RStudio, the Build Book button, when building All Formats, uses rmarkdown::render_site(encoding = 'UTF-8') to build all outputs in a single command.
I'd like to ensure what happens on my CI server is exactly what happens in my IDE, so it seems like I should have Travis call rmarkdown::render_site rather than several invocations of bookdown::render_book as is done by the bookdown-demo. However, Yihui is the expert, and he has chosen to use the latter approach.
So, my question: what is the best script to invoke on a continuous integration server like Travis when multiple outputs will be built?