Skip to content

Clarify that quarto publish gh-pages creates the branch automatically#2001

Merged
cderv merged 3 commits intomainfrom
docs/gh-pages-auto-branch
Apr 28, 2026
Merged

Clarify that quarto publish gh-pages creates the branch automatically#2001
cderv merged 3 commits intomainfrom
docs/gh-pages-auto-branch

Conversation

@cderv
Copy link
Copy Markdown
Member

@cderv cderv commented Apr 28, 2026

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

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.
@github-actions github-actions Bot temporarily deployed to pull request April 28, 2026 10:33 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

📝 Preview Deployment

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

🔄 Modified Documents

@github-actions github-actions Bot temporarily deployed to pull request April 28, 2026 13:41 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

📝 Preview Deployment

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

🔄 Modified Documents

@github-actions github-actions Bot temporarily deployed to pull request April 28, 2026 14:11 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

📝 Preview Deployment

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

🔄 Modified Documents

@cderv cderv merged commit 56cb6d7 into main Apr 28, 2026
7 of 8 checks passed
@cderv cderv deleted the docs/gh-pages-auto-branch branch April 28, 2026 14:14
@github-actions
Copy link
Copy Markdown
Contributor

Successfully created backport PR for prerelease:

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.

Manually creating gh-pages branch isn't necessary for publishing to GitHub Pages

1 participant