How to update tidycoRe
07_update_tidycoRe.Rmd
Overview
The following vignette will describe how to update the tidycoRe package and the corresponding website.
tidycoRe employs a multiple-branching strategy, and uses the devtools, pkgdown, and usethis packages in conjunction with GitHub Actions to automate package documentation.
Branching strategy
tidycoRe has 2 branches for the current version of the package, and additional branches for features in development.
- main
- The primary branch for the package. This branch is locked and commits cannot be directly pushed.
- staging
- The branch to be merged into main via pull request when a group of changes is ready to be updated.
- dev
- New branches for development of additional features. These should be pull requested into the staging branch when ready.
Example steps to update
- Create a new dev branch
- Make updates, commit and push to new dev branch
- Submit a pull request to pull into staging branch
- Codeowner reviews and accepts PR, merges into staging branch
- When the package is ready to be updated:
- Update the documentation on staging branch (see below), commit and push
- Submit PR to merge staging into main
- Codeowner approves PR
- PR into main branch will trigger GitHub Actions to automatically update wiki site
To update the documentation on the staging branch:
usethis::use_version("patch") # To increment the version number major.minor.patch
devtools::document() # Updates the documentation
pkgdown::clean_site() # Cleans the site docs
pkgdown::build_site() # Re-builds the site docs