Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions R/pkgdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ use_pkgdown_github_pages <- function() {
tr <- target_repo(github_get = TRUE, ok_configs = c("ours", "fork"))
check_can_push(tr = tr, "to turn on GitHub Pages")

cfg <- github_remote_config(github_get = NA)
online <- is_online(tr$host)

default_branch <- if (online) {
git_default_branch_(cfg)
} else {
guess_local_default_branch()
}
challenge_non_default_branch(
"Your site will not build until this branch is merged with
{.val {default_branch}}. Do you want to continue on this branch?",
default_branch = default_branch
)

use_pkgdown()
site <- use_github_pages()
use_github_action("pkgdown")
Expand Down
2 changes: 1 addition & 1 deletion man/usethis-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading