ghactions v0.4.1

GitHub actions for R

Provides GitHub actions and some R functions to create workflows.


GitHub actions for R

Actions Status lifecycle CRAN status codecov License: MIT

GitHub actions are a new workflow automation feature of the popular code repository host GitHub. The product is currently in limited beta. It may offer a better way to adopt continuous integration and delivery best practices in the R community. GitHub actions is a convenient service layer on top of the popular container standard docker, and is itself partly open source, thus limiting vendor lock-in. Most importantly, it is simple to reason about if things go wrong.

The ghactions project offers three avenues to bring GitHub actions to the #rstats community:

  1. Some actions to run R-specific jobs on GitHub, including arbitrary R code or deploying to These actions are maintained in this repository, but are not technically part of the accompanying ghactions R package. You can use these actions independently from the package; they are freely available on GitHub marketplace. In fact, the whole idea of GitHub actions is that people re-use such small building blocks any way they like.
  2. The accompanying ghactions R package furnishes you with some out-of-the-box workflows for different kinds of projects. These functions are styled after the popular usethis package. They don't do much: They just set you up with some configuration files for your project, using sensible defaults.
  3. Documenting experiences and evolving best practices for how to make the most of GitHub actions for R.


To install, run:


ghactions currently relies on a dev version of usethis, which should be automatically installed alongside it.

If you're using devtools::install_github() or otherwise currently have usethis loaded, you may need to restart your the R session before ghactions can find the dev usethis (RStudio > Session > Restart R).

Because you're likely only to ever use it once, you need not take on ghactions as a dependency in your projects.

Quick Start

GitHub actions just requires a special file in a special directory at the root of your repository to work: .github/main.workflow.

To quickly set up such a file for frequently used project kinds, run:

ghactions::use_ghactions(workflow = website())

See the documentation for implied defaults and alternatives.

Then push to GitHub and go to the actions tab in your repository. Enjoy.

Functions in ghactions

Name Description
auto_commit Automatically commit changes
firebase Create Google Firebase CLI action to use Firebase
ghactions_events Supported events to trigger GitHub actions
edit_workflow Open configuration files
docker_cli Create Docker CLI action to run Docker
filter Create filter action
ghactions ghactions: GitHub actions for R
browse_github_actions Quickly browse to important package webpages
fix_docs Fix documentation
document Document Package
rscript_byod Create Rscript-byod action to run arbitrary R expressions
rsync Create rsync action to deploy via Rsync over SSH
use_ghactions Workflow automation with GitHub Actions
use_dockerfile Set up a simple Dockerfile
ghpages Create ghpages action to deploy to GitHub Pages
install_deps Install Dependencies
make_blocks Create GitHub Actions syntax blocks
netlify Create netlify cli action to use the Netlify CLI
use_ghactions_badge README badges
website Render and deploy a website
No Results!

Vignettes of ghactions

No Results!


Include our badge in your README