This workflow renders some Rmarkdown via its (custom) site generator and deploys the result. Suitable for:

website(
  name = "Render and Deploy RMarkdown Website",
  deploy = list(ghpages()),
  on = c("push", "pull_request")
)

Arguments

name

[character(1)] giving the name of the workflow. Defaults to NULL, for no name, in which case GitHub will use the file name.

deploy

[list(1)] giving a list of deploy functions.

on

[character()] giving the GitHub Event on which to trigger the workflow. Must be a subset of ghactions_events. Defaults to "push", in which case the workflow is triggered on every push event. Can also be a named list as returned by on() for additional filters.

Details

rmarkdown::render_site() returns the directory to which outputs have been rendered. This workflow saves that directory in the environment variable DEPLOY_PATH, which is the default expected by ghpages() and other deployment methods.