Skip to contents

The GitHub Actions workflow deploys a pkgdown site for your package on 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 a (subdirectory of an) R package.

overwrite

Whether to overwrite an existing action.

platform

Platform to use for deploying the package. See Details.

version

Version of the platform. See Details.

Value

Invisibly returns NULL 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

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/RtmpMnTOJq/file1ef44025effc/.github/.gitignore': No such file or directory
#> Error in file(path, open = file_mode, encoding = "utf-8"): cannot open the connection
# }