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"
stagestep_session_info()
in the"install"
stage.step_setup_ssh()
in the"before_deploy"
to setup the upcoming deployment (ifdeploy
is set and only on GitHub Actions),step_setup_push_deploy()
in the"before_deploy"
stage (ifdeploy
is set),step_build_pkgdown()
in the"deploy"
stage, forwarding all...
arguments.step_do_push_deploy()
in the"deploy"
stage.
By default, the docs/
directory is deployed to the gh-pages
branch,
keeping the history.
Usage
do_pkgdown(
...,
deploy = NULL,
orphan = FALSE,
checkout = TRUE,
path = "docs",
branch = "gh-pages",
remote_url = NULL,
commit_message = NULL,
commit_paths = ".",
force = FALSE,
private_key_name = "TIC_DEPLOY_KEY"
)
Arguments
- ...
Passed on to
step_build_pkgdown()
- deploy
[flag]
IfTRUE
, deployment setup is performed before building the pkgdown site, and the site is deployed after building it. Set toFALSE
to skip deployment. By default (ifdeploy
isNULL
), deployment happens if the following conditions are met:The repo can be pushed to (see
ci_can_push()
). account for old default "id_rsa"The
branch
argument isNULL
(i.e., if the deployment happens to the active branch), or the current branch is the default branch, or contains "cran-" in its name (for compatibility with fledge) (seeci_get_branch()
).
- orphan
[flag]
Create and force-push an orphan branch consisting of only one commit? This can be useful e.g. forpath = "docs", branch = "gh-pages"
, but cannot be applied for pushing to the current branch.- checkout
[flag]
Check out the current contents of the repository? Defaults toTRUE
, set toFALSE
if the build process relies on existing contents or if you deploy to a different branch.- path, branch
By default, this macro deploys the
docs
directory to thegh-pages
branch. This is different fromstep_push_deploy()
.- 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?- private_key_name
string
Only needed when deploying from builds on GitHub Actions. If you have set a custom name for the private key during creation of the SSH key pair via tic::use_ghactions_deploy()] oruse_tic()
, pass this name here.
See also
Other macros:
do_blogdown()
,
do_bookdown()
,
do_drat()
,
do_package_checks()
,
do_readme_rmd()
,
list_macros()