Skip to contents

The GitHub Actions workflow deploys a pkgdown site for your package to the gh-pages branch.

Usage

gha_pkgdown_branch(
  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

pkgdown::build_site() builds the package website locally.

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

Examples

# \dontrun{
# With Ubuntu 20.04.
gha_pkgdown_branch(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
# }