wflow_use_gitlab automates all the local configuration necessary to deploy your workflowr project with GitLab Pages. However, you will need to manually login to your account and create the new repository on GitLab. The final step is to run wflow_git_push in the R console.

wflow_use_gitlab(username = NULL, repository = NULL,
  navbar_link = TRUE, protocol = "https", domain = "gitlab.com",
  project = ".")

Arguments

username

character (default: NULL). The GitLab username for the remote repository. If not specified, workflowr will attempt to guess this from the current remote named "origin" if it had previously been configured.

repository

character (default: NULL). The name of the remote repository on GitLab. If not specified, workflowr will attempt to guess this from the current remote named "origin" if it had previously been configured.

navbar_link

logical (default: TRUE). Insert a link to the GitLab repository into the navigation bar.

protocol

character (default: "https"). The protocol for communicating with GitLab. Must be either "https" or "ssh".

domain

character (default: "gitlab.com"). The domain of the remote host. You only need to change this if you are using a custom GitLab instance hosted by your organization. For example, "git.rcc.uchicago.edu" is the domain for the GitLab instance hosted by the University of Chicago Research Computing Center.

project

character (default: ".") By default the function assumes the current working directory is within the project. If this is not true, you'll need to provide the path to the project directory.

Value

Invisibly returns a list of class wflow_use_gitlab. This is currently for internal use only. Please open an Issue if you'd like to use this information.

Details

wflow_use_gitlab performs the following steps and then commits the changes:

  • Renames the website directory from docs/ to public/

  • Edits the setting output_dir in the file _site.yml to save the website files in public/

  • Adds a link to the GitLab repository in the navigation bar

  • Creates the required file .gitlab-ci.yml

  • Configures the Git remote settings to use GitLab

For more details, read the documentation provided by GitLab Pages.

See also

Examples

# NOT RUN {
wflow_use_gitlab("your-username", "name-of-repository")
# Login with GitLab account and create new repository
wflow_git_push()
# }