step_push_deploy: Step: Setup and perform push deploy

View source: R/steps-git.R

step_push_deployR Documentation

Step: Setup and perform push deploy

Description

Clones a repo, initializes author information, sets up remotes, commits, and pushes. Combines step_setup_push_deploy() with checkout = FALSE and a suitable orphan argument, and step_do_push_deploy().

Deployment usually requires setting up SSH keys with use_tic().

Usage

step_push_deploy(
  path = ".",
  branch = NULL,
  remote_url = NULL,
  commit_message = NULL,
  commit_paths = ".",
  force = FALSE
)

Arguments

path

⁠[string]⁠
Path to the repository, default "." which means setting up the current repository.

branch

⁠[string]⁠
Target branch, default: current branch.

remote_url

⁠[string]⁠
The URL of the remote Git repository to push to, defaults to the current GitHub repository.

commit_message

⁠[string]⁠
Commit message to use, defaults to a useful message linking to the CI build and avoiding recursive CI runs.

commit_paths

⁠[character]⁠
Restrict the set of directories and/or files added to Git before deploying. Default: deploy all files.

force

⁠[logical]⁠
Add --force flag to git commands?

Details

Setup and deployment are combined in one step, the files to be deployed must be prepared in a previous step. This poses some restrictions on how the repository can be initialized, in particular for a nonstandard path argument only orphan = TRUE can be supported (and will be used).

For more control, create two separate steps with step_setup_push_deploy() and step_do_push_deploy(), and create the files to be deployed in between these steps.

See Also

Other deploy steps: step_do_push_deploy(), step_setup_push_deploy()

Other steps: step_add_to_drat(), step_add_to_known_hosts(), step_build_pkgdown(), step_do_push_deploy(), step_hello_world(), step_install_pkg, step_install_ssh_keys(), step_run_code(), step_session_info(), step_setup_push_deploy(), step_setup_ssh(), step_test_ssh(), step_write_text_file()

Examples

## Not run: 
dsl_init()

get_stage("script") %>%
  add_step(step_push_deploy(commit_paths = c("NAMESPACE", "man")))

dsl_get()

## End(Not run)

ropenscilabs/tic documentation built on Feb. 5, 2024, 5:06 p.m.