Skip to contents

The GitHub Actions workflow documents your package (see update_docs()), checks it and deploys its pkgdown site to the gh-pages branch.

Usage

gha_update_docs(
  pkg = ".",
  overwrite = TRUE,
  platform = "macOS",
  version = "latest"
)

Source

Examples from r-lib/actions.

Arguments

pkg

Path to the package root directory.

overwrite

Whether to overwrite an existing workflow file.

platform

Runner operating system to use for deploying the site. See Details.

version

Runner image version. See Details.

Value

NULL, invisibly, after writing a GitHub Actions workflow to <pkg>/.github/workflows.

Details

Check https://github.com/actions/runner-images to see the available options.

See also

update_docs() documents and checks your package.

GitHub Actions workflow helpers: gha_check_full(), gha_pkgdown_branch()

Examples

# \dontrun{
# With Ubuntu 20.04.
gha_update_docs(platform = "ubuntu", version = "20.04")
#> ✔ Adding "R-version" to .github/.gitignore.
#> Warning: cannot open file '/tmp/RtmptWjacV/file19f42961b14f/.github/.gitignore': No such file or directory
#> Error in file(path, open = file_mode, encoding = "utf-8"): cannot open the connection
# }