cr_deploy_pkgdown {googleCloudRunner} | R Documentation |
Deploy a cloudbuild.yml for a pkgdown website of an R package
Description
This builds a pkgdown website each time the trigger fires and deploys it to git
Usage
cr_deploy_pkgdown(
github_repo,
secret,
steps = NULL,
create_trigger = c("file", "inline", "no"),
cloudbuild_file = "cloudbuild-pkgdown.yml",
git_email = "googlecloudrunner@r.com",
env = NULL,
build_image = "gcr.io/gcer-public/packagetools:latest",
post_setup = NULL,
post_clone = NULL
)
Arguments
github_repo |
The GitHub repo to deploy pkgdown website from and to. |
secret |
The name of the secret on Google Secret Manager for the git ssh private key |
steps |
extra steps to run before the pkgdown website steps run |
create_trigger |
If not "no" then the buildtrigger will be setup for you via cr_buildtrigger, if "file" will create a buildtrigger pointing at |
cloudbuild_file |
The cloudbuild yaml file to write to |
git_email |
The email the git commands will be identifying as |
env |
A character vector of env arguments to set for all steps |
build_image |
A docker image with |
post_setup |
Steps that occur after git setup |
post_clone |
A cr_buildstep that occurs after the repo is cloned |
Details
The trigger repository needs to hold an R package configured to build a pkgdown website.
For GitHub, the repository will also need to be linked to the project you are building within, via https://console.cloud.google.com/cloud-build/triggers/connect
The git ssh keys need to be deployed to Google Secret Manager for the deployment of the website - see cr_buildstep_git - this only needs to be done once per Git account.
See Also
Create your own custom deployment using cr_buildstep_pkgdown which this function uses with some defaults.
Other Deployment functions:
cr_deploy_docker_trigger()
,
cr_deploy_docker()
,
cr_deploy_packagetests()
,
cr_deploy_run_website()
,
cr_deploy_run()
,
cr_deploy_r()
Examples
pd <- cr_deploy_pkgdown("MarkEdmondson1234/googleCloudRunner",
secret = "my_git_secret",
create_trigger = "no"
)
pd
file.exists("cloudbuild-pkgdown.yml")
unlink("cloudbuild-pkgdown.yml")
## Not run:
cr_deploy_pkgdown("MarkEdmondson1234/googleCloudRunner",
secret = "my_git_secret",
create_trigger = "inline"
)
## End(Not run)