use_gitlab_ci: Add .gitlab-ci.yml file in your current project from template

View source: R/ci.R

use_gitlab_ciR Documentation

Add .gitlab-ci.yml file in your current project from template

Description

Add .gitlab-ci.yml file in your current project from template

Usage

use_gitlab_ci(
  image = "rocker/verse:latest",
  repo_name = "https://packagemanager.rstudio.com/all/__linux__/focal/latest",
  path = ".gitlab-ci.yml",
  overwrite = TRUE,
  add_to_Rbuildignore = TRUE,
  type = "check-coverage-pkgdown"
)

Arguments

image

Docker image to use in GitLab ci. If NULL, not specified!

repo_name

REPO_NAME environment variable for R CRAN mirror used

path

destination path for writing GitLab CI yml file

overwrite

whether to overwrite existing GitLab CI yml file

add_to_Rbuildignore

add CI yml file and cache path used inside the CI workflow to .Rbuildignore?

type

type of the CI template to use

Details

Types available are:

  • "check-coverage-pkgdown": Check package along with Code coverage with covr and pkgdown site on GitLab Pages

  • "check-coverage-pkgdown-renv": Check package built in a fixed renv state along with Code coverage with covr and pkgdown site on GitLab Pages.

  • "bookdown": Build bookdown HTML and PDF site on GitLab Pages

  • "bookdown-production": Build bookdown HTML and PDF site on GitLab Pages. Where default page is for branch named 'production' and "dev/" sub-folder is for 'main' (or 'master') branch.

Value

Used for side effects. Creates a .gitlab-ci.yml file in your directory.

Examples

# Create in another directory
use_gitlab_ci(image = "rocker/verse:latest", path = tempfile(fileext = ".yml"))
## Not run: 
# Create in your current project with template for packages checking
use_gitlab_ci(image = "rocker/verse:latest", type = "check-coverage-pkgdown")

## End(Not run)

gitlabr documentation built on Sept. 13, 2022, 5:06 p.m.