This function will generate both the CRAN vignettes and gh-pages vignettes. It will look for your personal github token (GITHUB_TOKEN
) that the function may deploy to the gh-pages branch of the your package's github repo.
deploy_travis(repo = gsub(".*://([^.]*)\\.github.io/([^/]*).*",
"\\1/\\2", read_rmd_yaml(file.path("vignettes", "docs.Rmd"))$redirect),
valid_branches = "master", token_key = "GITHUB_PAT",
email = "travis@travis-ci.org", name = "Travis CI",
push_branch = "gh-pages", output_dir = "_gh-pages",
build_fn = function(ouput_dir, ...) { devtools::install(".")
build_vignettes(pkg = ".", output_dir = output_dir) })
character string that has the form USER/REPO
branch name(s) that are allowed to deploy
key name that will be autofilled
email for commit
name for commit
branch the website should be pushed to. Defaults to 'gh-pages'
output directory to put the website in
function to build the documentation. This function must take ouput_dir
and ...
for future expansion. Defaults to packagedocs::build_vignettes
The function is designed so that packagedocs will never ask for your token directly. It will only issue commands to the terminal which should evaluate with the necessary information.