You can use a GitHub Action to automate the building and deployment of your project. This function wraps usethis::use_github_action() to install an Actions file that will:

  • install R

  • install and cache your dependencies (using DESCRIPTION)

You will need to adapt the sections in your Actions file to:

  • build your project

  • deploy your project

To help you draw the "rest of the owl", the r-lib actions repository is a great place to start.

proj_workflow_use_action(
  name = "project-workflow",
  save_as = NULL,
  ignore = TRUE,
  open = TRUE
)

Arguments

name

Name of the workflow file, with or without a .yaml extension.

save_as

Name of the workflow file. Defaults to fs::path_file(url) for use_github_action().

ignore

Should the newly created file be added to .Rbuildignore?

open

Open the newly created file for editing? Happens in RStudio, if applicable, or via utils::file.edit() otherwise.

Value

Invisible NULL, called for side effects.

Examples

# not run because it produces side effects
if (FALSE) {
  proj_workflow_use_action()
}