ghactions (version 0.4.1)

ghpages: Create ghpages action to deploy to GitHub Pages

Description

Remember to provide a GitHub personal access token secret named GH_PAT to the GitHub UI.

  1. Set up a new PAT. You can use usethis::browse_github_pat() to get to the right page. Remember that this PAT is not for your local machine, but for GitHub actions.

  2. Copy the PAT to your clipboard.

  3. Go to the settings of your repository, and paste the PAT as a secret. The secret must be called GH_PAT.

For details, see docs of the ghpages action.

Thin wrapper around GitHub actions.

Usage

ghpages(IDENTIFIER = "Deploy", needs = "Filter master",
  BUILD_DIR = "_site", env = NULL)

Arguments

IDENTIFIER

[character(1)] giving the name of the action or workflow block.

Used:

  • as an informative label on GitHub.com,

  • in the needs fields of other action blocks to model the workflow graph,

  • in the resolves fields of other workflow blocks to model the workflow graph.

needs

[character()] giving the actions (by their IDENTIFIERs) that must complete successfully before this action will be invoked. Defaults to NULL for no upstream dependencies.

BUILD_DIR

[character(1)] giving the path relative from your /github/workspace to the directory to be published.

env

[list(character(1)] giving the environment variables to set in the action's runtime environment. Defaults to NULL for no environment variables.

...

arguments passed on to other methods, not currently used.

Details

These functions are for advanced users knowledgeable about GitHub actions. Novice users may be better served by the complete templates in workflows.

These functions provide very thin wrappers around existing GitHub actions, including actions from other repositories. Essentially, they just create lists ready to be ingested by make_action_block(), which then turns these R lists into valid GitHub actions syntax blocks.

For documentation on these actions, consult their respective README.mds linked in the below. Some variants of these action wrappers include sensible defaults for frequent uses in R.

The uses field is always hardcoded to a particular commit or tag of the underlying github action to ensure compatibility.

To render an action block completely from scratch, you can always use the templating function make_action_block().

See Also

Other actions: docker_cli, document, filter, firebase, install_deps, netlify, rscript_byod, rsync