Skip to content

Could use_github_pages() turn on GitHub Pages? #224

Description

@charliejhadley

There is already support for use_github_labels in usethis, it would be great to programmatically turn on GitHub Pages for a repo without having to visit the settings page.

use_github_pages(source.branch = "master")
# Your site is published at https://username.github.io/repo

If the provided source.branch cannot be found then return the following error (a la http://style.tidyverse.org/error-messages.html#hints):

use_github_pages(source.branch = "not-a-real-branch")
#> Can't find branch 'not-a-real-branch' in the list of branches for GitHub repo 'my-repo'.
#> Refer to https://github.com/username/my-repo/settings for further settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementgitgit, GitHub, and CI in general

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions