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

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

Arguments

username

character (default: NULL). The GitHub 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 GitHub. 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 GitHub repository into the navigation bar.

protocol

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

domain

character (default: "github.com"). The domain of the remote host. You only need to change this if your organization is using GitHub Enterprise.

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_github. This is currently for internal use only. Please open an Issue if you'd like to use this information.

Details

wflow_use_github performs the following steps and then commits the changes:

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

  • Configures the Git remote settings to use GitHub

  • (Only if necessary) Renames the website directory to docs/

  • (Only if necessary) Edits the setting output_dir in the file _site.yml to save the website files in docs/

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

See also

Examples

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