quarto publish gh-pages cannot bootstrap a repository with no gh-pages branch (docs say it creates one)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- git, github, javascript
调研方向
Start at the quarto publish gh-pages command’s resolveDeployment path, which the error trace locates in the bundled quarto.js, and trace how it checks for a remote gh-pages branch. Reproduce with a website project in a subdirectory and an origin that has only main; compare local and CI publishing. Done means first publish creates the branch as documented, or the error explains a working bootstrap procedure.
由索引模型根据 Issue 内容生成。
描述
Checks
- I have searched the existing issues and discussions, and this has not been reported.
- I have tested with the latest stable version of Quarto.
System
Linux (x86_64), Quarto 1.10.19 stable, git 2.x, remote over HTTPS with a credential helper.
Expected
Per https://quarto.org/docs/publishing/github-pages.html ("Source Branch"):
quarto publish gh-pagesautomatically creates a gh-pages branch (locally and on the remote) on its first run if one does not already exist.
Actual
Running exactly that first run locally fails, and says to do the thing that just failed:
$ quarto publish gh-pages --no-prompt --no-browser
ERROR: Unable to publish to GitHub Pages (the remote origin does not have a branch named
"gh-pages". Use first `quarto publish gh-pages` locally to initialize the remote repository
for publishing.)
at resolveDeployment (file:///opt/quarto/bin/quarto.js:173771:13)
Answering the confirmation prompt interactively (printf 'y\n' | quarto publish gh-pages --no-browser) gives the same error. The same error also aborts quarto-dev/quarto-actions/publish@v2 with target: gh-pages, so the documented CI recipe cannot bootstrap a new repository either: the job fails at the publish step and no gh-pages branch is ever created.
Repository shape that may matter
- Git repository root:
/repo, with the Quarto project in a subdirectory:/repo/05_website/_quarto.yml(project.type: website,output-dir: _site,website.site-urlset to the project-page URL). - Branches on
origin:mainonly. Nogh-pages. - No
_publish.ymlanywhere (i.e. genuinely a first run).
So the case is: valid website project, canonical site-url configured, publishing source absent. That is precisely the case the docs say Quarto initialises.
What we did to get unblocked
Created the branch by hand once, with git plumbing so the working tree was untouched:
empty=$(git hash-object -t tree /dev/null)
commit=$(git commit-tree "$empty" -m "Initialize gh-pages branch for Quarto publishing")
git push origin "$commit:refs/heads/gh-pages"
After that, the same quarto publish gh-pages invocation (from CI) renders and deploys normally, GitHub picks the branch up and Pages reports status: built. So the failure is specific to creating the branch, not to the deployment itself.
Two asks
- If branch creation is conditional on something (project at the repository root? a remote helper? an interactive TTY?
_publish.yml?), please document the condition; the current error message points at a step that cannot be performed, because performing it produces the same error. - Otherwise, either create the branch on first run as documented, or replace the message with the three-command manual bootstrap above.
Happy to test a pre-release against this repository shape.
- 主要语言
- JavaScript
- 星标
- 6.1k
- 派生
- 476
- 平均合并
- 16 小时 42 分钟
- 30 天内合并 PR
- 115
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
quarto-dev/quarto-cli 的其他 Issue
-
accessibility bug websites
难度 1/5 1-3 小时 新手友好度 88/100
quarto-dev/quarto-cli#15235 ·
维护者通常 1 天内回复
-
quarto.json.decode does not raise on invalid JSON, so pcall cannot catch it可能已有人在做 @sogav21 于 1 天前认领。 未关闭bug lua
难度 2/5 1-3 小时 新手友好度 84/100
quarto-dev/quarto-cli#15226 ·
维护者通常 1 天内回复
-
arrow-dark gives region markers a light band that fails contrast可能已有人在做 @vav7 于 1 天前认领。 未关闭accessibility bug themes
难度 1/5 1 小时以内 新手友好度 88/100
quarto-dev/quarto-cli#15222 ·
维护者通常 1 天内回复
-
bug code-annotation
难度 2/5 1-3 小时 新手友好度 76/100
quarto-dev/quarto-cli#15215 ·
维护者通常 1 天内回复
-
accessibility bug website-navigation
难度 2/5 1-3 小时 新手友好度 83/100
quarto-dev/quarto-cli#15190 ·
维护者通常 1 天内回复
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
赞~未关闭
难度 1/5 1 小时以内 新手友好度 72/100
DeanChensj/jiangshan-map#221 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 13 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
AtlasOfLivingAustralia/species-lists#874 ·
维护者通常 1 天内回复
-
Slack: DM thread replies sent with "Also send to..." never reach the agent可能已有人在做 @roboeve 今天认领。 未关闭bug channel:slack p2
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复