For more information, see the setup details vignette before running this function. This workflow will assume the website is built from a branch called gh-pages.

use_update_pkgdown(
  workflow_name = "call-update-pkgdown.yml",
  build_trigger = "push_to_main",
  additional_args = NULL,
  tag_ghactions4r = NULL
)

Arguments

workflow_name

What to name the github action workflow locally. Must have the file extension .yml

build_trigger

Select the event that triggers the workflow. Options are:

push_to_main

Run on pushing commits to main (default)

weekly

Run on the default branch (usually main) once a week

manually

run manually with the workflow_dispatch trigger

Multiple build triggers are allowed; specify them as a vector. Note that invalid build triggers will be silently removed as long as one build trigger is specified correctly.

additional_args

A named list of additional command line arguments to be passed to the workflow. The names of the list represent the platforms (windows, macos, or ubuntu), and the values are character vectors of arguments. These additional arguments are executed after the step that checks out the repository and before the step that sets up R.

tag_ghactions4r

Tag of ghactions4r workflow to pin to for the reusable workflow. This ensures compatibility with a specific version of ghactions4r functions. The tradeoff is that fixes will not happen automatically; instead, the user will have to update the pinned version of the caller workflow used. See the options by looking at the ghactions4r tags. Another option is to pin to commit hashes, but the user will need to do this by manually editing the caller workflow after creation. See github documentation on security to understand how this is more secure. Again, the tradeoff is that the workflow will not be automatically updated.

Examples

if (FALSE) { # \dontrun{
use_update_pkgdown(
  additional_args = list(
    ubuntu = c(
      "sudo apt-get update",
      "sudo apt-get install -y libcurl4-openssl-dev",
      "sudo add-apt-repository ppa:ubuntu-toolchain-r/test",
      "sudo apt-get install --only-upgrade libstdc++6"
    ),
    macos = c("brew install curl")
  )
)
} # }