Skip to content

[Sync to prerelease] Clarify that quarto publish gh-pages creates the branch automatically#2002

Merged
cderv merged 1 commit intoprereleasefrom
sync-2001-to-prerelease
Apr 28, 2026
Merged

[Sync to prerelease] Clarify that quarto publish gh-pages creates the branch automatically#2002
cderv merged 1 commit intoprereleasefrom
sync-2001-to-prerelease

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Description

Sync of #2001 to prerelease.

Original PR

Clarify that quarto publish gh-pages creates the branch automatically

The Source Branch section in docs/publishing/github-pages.qmd instructed readers to manually create a gh-pages branch and configure GitHub Pages settings before running quarto publish gh-pages. As reported in quarto-dev/quarto-cli#14448, this is misleading: quarto publish gh-pages already creates the branch (locally and on the remote) on its first run via gitCreateGhPages, and for project sites GitHub auto-detects the new branch and configures Pages without any settings change.

The manual steps were added in #550 to address the case of a repo with no pre-existing gh-pages branch, but quarto publish gh-pages already covers that.

Changes

  • Rewrite ### Source Branch to lead with the automatic behavior.
  • Keep the user/organization site case (where the source branch defaults to main and does need a manual switch to gh-pages) with the existing screenshot. Quarto already prints a notice with a direct link to the settings page in this case.
  • Fold the manual git checkout --orphan gh-pages recipe into a collapsible callout-tip for users who still want to set the branch up beforehand.
  • Drop the "configure the Source Branch" precondition from the ## Publish Command intro and the ### Publishing opening sentence.

The #source-branch anchor is preserved so the existing link from ## User Site keeps working.

closes quarto-dev/quarto-cli#14448

…#2001)

* Clarify that quarto publish gh-pages creates the branch automatically

The Source Branch section instructed users to manually create a gh-pages
branch and configure Pages settings before publishing, but quarto publish
gh-pages handles both already (gitCreateGhPages in quarto-cli).

Lead with the automatic behavior, document the user/org site exception
that still needs a manual source switch, and fold the manual git steps
into a collapsible callout for users who want to set up the branch
beforehand.

Reported in quarto-dev/quarto-cli#14448.

* Link GitHub docs and clarify user/org-site behavior is GitHub-specific

* Link 'User and organization sites' term to GitHub docs for symmetry

(cherry picked from commit 56cb6d7)
@cderv
Copy link
Copy Markdown
Member

cderv commented Apr 28, 2026

/deploy-preview

@github-actions
Copy link
Copy Markdown
Contributor Author

📝 Preview Deployment

🔍 Full site preview: https://deploy-preview-2002.quarto.org

🔄 Modified Documents

@cderv cderv merged commit 22f988b into prerelease Apr 28, 2026
@cderv cderv deleted the sync-2001-to-prerelease branch April 28, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant