| use_github_action | R Documentation |
Writes '.github/workflows/ci.yaml' using the r-ci template (Ubuntu and macOS, via 'eddelbuettel/github-actions/r-ci@master'). Adds '^\.github$' to '.Rbuildignore' if not already present.
use_github_action(path)
path |
Path to package root directory. Required; no default is provided because this function writes files under 'path', and CRAN Repository Policy forbids defaulting write paths to the user's home filespace (which includes 'getwd()'). |
Path to the created YAML file (invisibly).
# Scaffold a throwaway package in tempdir() and add the workflow.
pkg <- file.path(tempdir(), "ghapkg_example")
dir.create(pkg, showWarnings = FALSE)
writeLines(c(
"Package: ghapkg",
"Title: Example",
"Version: 0.0.1",
"Authors@R: person('A', 'B', email = 'a@b.com', role = c('aut','cre'))",
"Description: Example.",
"License: GPL-3"
), file.path(pkg, "DESCRIPTION"))
yaml <- use_github_action(path = pkg)
file.exists(yaml)
unlink(pkg, recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.