step_do_push_deploy | R Documentation |
Commits and pushes to a repo prepared by step_setup_push_deploy()
.
Deployment usually requires setting up SSH keys with
use_tic()
.
step_do_push_deploy(
path = ".",
commit_message = NULL,
commit_paths = ".",
force = FALSE
)
path |
|
commit_message |
|
commit_paths |
|
force |
|
It is highly recommended to restrict the set of files
touched by the deployment with the commit_paths
argument:
this step assumes that it can freely overwrite all changes to all files
below commit_paths
, and will not warn in case of conflicts.
To mitigate conflicts race conditions to the greatest extent possible, the following strategy is used:
The changes are committed to the branch
Before pushing, new commits are fetched, and the changes are cherry-picked on top of the new commits
If no new commits were pushed after the CI run has started, this strategy is equivalent to committing and pushing. In the opposite case, if the remote repo has new commits, the deployment is safely applied to the current tip.
Other deploy steps:
step_push_deploy()
,
step_setup_push_deploy()
Other steps:
step_add_to_drat()
,
step_add_to_known_hosts()
,
step_build_pkgdown()
,
step_hello_world()
,
step_install_pkg
,
step_install_ssh_keys()
,
step_push_deploy()
,
step_run_code()
,
step_session_info()
,
step_setup_push_deploy()
,
step_setup_ssh()
,
step_test_ssh()
,
step_write_text_file()
## Not run:
dsl_init()
# Deployment only works if a companion step_setup_push_deploy() is added
get_stage("deploy") %>%
add_step(step_setup_push_deploy(path = "docs", branch = "gh-pages")) %>%
add_step(step_build_pkgdown())
if (rlang::is_installed("git2r") && git2r::in_repository()) {
get_stage("deploy") %>%
add_step(step_do_push_deploy(path = "docs"))
}
dsl_get()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.