quarto publish gh-pages cannot bootstrap a repository with no gh-pages branch (docs say it creates one)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- git, github, javascript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 6.1k
- Forks
- 478
- Ø Merge
- 17 Std. 7 Min.
- Gemergte PRs (30 T.)
- 112
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus quarto-dev/quarto-cli
-
enhancement websites
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
quarto-dev/quarto-cli#15255 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Website announcement dismiss control cannot be reached or used with a keyboardEvtl. vergeben @Xander-AJ hat das heute übernommen. Offenaccessibility bug websites
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
quarto-dev/quarto-cli#15235 ·
Maintainer antworten meist innerhalb von 1 Tag
-
quarto.json.decode does not raise on invalid JSON, so pcall cannot catch itEvtl. vergeben @sogav21 hat das vor 2 Tagen übernommen. Offenbug lua
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
quarto-dev/quarto-cli#15226 ·
Maintainer antworten meist innerhalb von 1 Tag
-
arrow-dark gives region markers a light band that fails contrastEvtl. vergeben @vav7 hat das vor 1 Tag übernommen. Offenaccessibility bug themes
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
quarto-dev/quarto-cli#15222 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug code-annotation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
quarto-dev/quarto-cli#15215 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in quarto-dev/quarto-cli
Ähnliche Issues
-
ready-for-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
LucasSantana-Dev/Lucky#2945 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
brijeshb42/monaco-vim#175 ·
-
good first issue
Schwierigkeit 2/5 3-5 Tage Anfängerfreundlichkeit 62/100
paipai1999/POS-system#3 ·
-
good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
r-afael/better-yt-recommendations#36 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
microsoft/playwright#43875 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag