In this tutorial we will discuss:
What Travis CI is and how it works
We will demonstrate two methods for adding Travis CI to a GitHub repo that does not contain a package - so in our case our repo contains an .rmd and we want to test if it renders
We will show how this process can be done manually, (this helps demonstrate what other packages that make this process faster actually do)
We will show a shorter version of the process using the usethis package
We will discuss what pkgdown is and how to use it
We will provide additional references including tutorials for adding Travis to a repo that does contain a package
What is Travis? Is this a person? Why is everyone talking about Travis???
Have you ever heard someone say that they used Travis to test their package? Who is this amazing code guru?!
*like pushing your code to the master branch on GitHub regularly
compilation etc.
***Travis helps automate this process***
https://blog.travis-ci.com/2019-05-30-setting-up-a-ci-cd-process-on-GitHub
Yes, Travis CI works on private and public projects!
Commit and push to GitHub!!
For more details on what to include see here and here.
Manually add a field called “Remotes” specifying where the package is on GitHub
Commit and push all your changes!
Your website URL is the one listed in your GitHub settings
For more info check here.
You can also create only the DESCRIPTION file manually, then use the usethis package to create the other necessary files
library(usethis)
usethis::use_readme_rmd()
# if you only have an README.md file
# this will also add the travis badge
# make sure you update the .md and .Rmd files!
usethis::use_travis()
# this will create the .travis.yml file
# this will also pull up https://travis-ci.org to allow you activate this repo easily
usethis::use_pkgdown()
# this will create .Rbuildignore and _pkdown.yml files
The wikipedia page has additional information on Travis CI in general.
This link will tell you more about how Travis CI works.
Remember you can use the usethis package to easily use pkgdown and travis for a package. This did not work as easily in our case as we were adding Travis CI and pkgdown to repos without a package. Here is a great tutorial.
Here is a list of common build problems.