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 (if deploy
is set and only on Travis CI),
step_setup_push_deploy()
in the "before_deploy"
stage
(if deploy
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.
do_pkgdown(
...,
deploy = NULL,
orphan = FALSE,
checkout = TRUE,
repos = repo_default(),
path = "docs",
branch = "gh-pages",
remote_url = NULL,
commit_message = NULL,
commit_paths = ".",
travis_private_key_name = "TRAVIS_DEPLOY_KEY"
)
Passed on to step_build_pkgdown()
[flag]
If TRUE
, deployment setup is performed
before building the pkgdown site,
and the site is deployed after building it.
Set to FALSE
to skip deployment.
By default (if deploy
is NULL
), deployment happens
if the following conditions are met:
The repo can be pushed to (see ci_can_push()
).'
The branch
argument is NULL
(i.e., if the deployment happens to the active branch),
or the current branch is master
(see ci_get_branch()
).
[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.
CRAN-like repositories to install from, defaults to
repo_default()
.
By default, this macro deploys the docs
directory
to the gh-pages
branch. This is different from step_push_deploy()
.
[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.
string
Only needed when deploying from builds on Travis CI.
If you have set a custom name for the private key during creation of the
SSH key pair in travis::use_travis_deploy()
or via use_tic, you need
to pass this name here.
Other macros:
do_bookdown()
,
do_drat()
,
do_package_checks()
# NOT RUN {
dsl_init()
do_pkgdown()
dsl_get()
# }
Run the code above in your browser using DataLab