diff --git a/R/pkgdown.R b/R/pkgdown.R index 6de39233d..962069b85 100644 --- a/R/pkgdown.R +++ b/R/pkgdown.R @@ -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") diff --git a/man/usethis-package.Rd b/man/usethis-package.Rd index f53350890..218422d6d 100644 --- a/man/usethis-package.Rd +++ b/man/usethis-package.Rd @@ -31,7 +31,7 @@ Authors: Other contributors: \itemize{ - \item Posit Software, PBC (\href{https://ror.org/03wc8by49}{ROR}) [copyright holder, funder] + \item Posit Software, PBC (03wc8by49) [copyright holder, funder] } }