Functions to define stages and their constitutent steps.
get_stage() returns a Stage object for a stage given by name.
This function only works when called by load_from_file().
add_step() adds a step to a stage, see step_hello_world()
and the links therein for available steps.
add_code_step() is a shortcut for add_step(step_run_code(...)).
do_package_checks() adds default steps related to package checks
to the "before_install", "install", "script" and "after_success"
stages:
step_install_deps() in the "install" stage, using the
repos argument.
step_rcmdcheck() in the "script" stage, using the
warnings_are_errors, notes_are_errors, args, and
build_args arguments.
A call to covr::codecov() in the "after_success" stage (only if the codecov flag is set)
do_pkgdown() builds and optionally deploys a pkgdown site and adds default steps
to the "install", "before_deploy" and "deploy" stages:
step_install_deps() in the "install" stage, using the
repos argument.
step_setup_ssh() in the "before_deploy" to setup the upcoming deployment.
step_setup_push_deploy() in the "before_deploy" stage.
step_build_pkgdown() in the "deploy" stage
step_do_push_deploy() in the "deploy" stage. By default, the deploy is done to the gh-pages branch.
get_stage(name)add_step(stage, step)
add_code_step(stage, call = NULL, prepare_call = NULL)
do_package_checks(..., codecov = !ci_is_interactive(),
warnings_are_errors = NULL, notes_are_errors = NULL,
args = c("--no-manual", "--as-cran"), build_args = "--force",
error_on = "warning", repos = repo_default(), timeout = Inf)
do_pkgdown(..., build_only = FALSE, orphan = FALSE, checkout = TRUE,
repos = repo_default(), path = ".", branch = NULL,
remote_url = NULL, commit_message = NULL, commit_paths = ".")
[string]
The name for the stage.
[Stage]
A Stage object as returned by get_stage().
[function]
An object of class TicStep, usually created by functions
with the step_ prefix like step_hello_world().
[call]
An arbitrary R expression executed during the stage to which this step is
added.
The default is useful if you only pass prepare_call.
[call]
An optional arbitrary R expression executed during preparation.
Ignored, used to enforce naming of arguments.
[flag] Whether to include a step running
covr::codecov(quiet = FALSE) (default: only for non-interactive CI,
see ci_is_interactive()).
[flag]
Deprecated, use error_on.
[flag]
Deprecated, use error_on.
[character]
Passed to rcmdcheck::rcmdcheck(), default:
c("--no-manual", "--as-cran").
[character]
Passed to rcmdcheck::rcmdcheck(), default:
"--force".
[character]
Whether to throw an error on R CMD check failures. Note that the check is
always completed (unless a timeout happens), and the error is only thrown
after completion. If "never", then no errors are thrown. If "error", then
only ERROR failures generate errors. If "warning", then WARNING failures
generate errors as well. If "note", then any check failure generated an
error.
[character]
Passed to rcmdcheck::rcmdcheck(), default:
repo_default().
[numeric]
Passed to rcmdcheck::rcmdcheck(), default:
Inf.
[flag] Build the pkgdown site but do not deploy it. Removes step
step_setup_ssh(), step_setup_push_deploy() and step_do_push_deploy()
from macro do_pkgdown.
[flag]
Create and force-push an orphan branch consisting of only one commit?
This can be useful e.g. for path = "docs", branch = "gh-pages",
but cannot be applied for pushing to the current branch.
[flag]
Check out the current contents of the repository? Defaults to TRUE,
set to FALSE if the build process relies on existing contents or
if you deploy to a different branch.
[string]
Path to the repository, default "." which means setting up the current
repository.
[string]
Target branch, default: current branch.
[string]
The URL of the remote Git repository to push to, defaults to the
current GitHub repository.
[string]
Commit message to use, defaults to a useful message linking to the CI build
and avoiding recursive CI runs.
[character]
Restrict the set of directories and/or files added to Git before deploying.
Default: deploy all files.