quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.91k stars 322 forks source link

`quarto publish gh-pages`: use remote source other than `origin` #5997

Open cderv opened 1 year ago

cderv commented 1 year ago

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/5993

Originally posted by **rgaiacs** June 21, 2023 ### Description I have a Git remote source named `quarto`: ``` $ git remote -v quarto git@github.com:gesiscss/orc2.git (fetch) quarto git@github.com:gesiscss/orc2.git (push) ``` Executing `quarto publish gh-pages` produces the follow prompt ``` ? Publish site to undefined using gh-pages? (Y/n) › ``` Will be great if the prompt get information of other remote sources.
mcanouil commented 1 year ago

FYI:

https://github.com/quarto-dev/quarto-cli/blob/41501dd86dee2103cb5d88954303feed32f1d3b0/src/core/github.ts#L40

@cderv To me it's not a bug, but an enhancement as everything currently works as intended and "by design".

cscheid commented 1 year ago

The line Publish site to undefined using gh-pages is pretty ugly, though!

cderv commented 1 year ago

Yes I agree with you @cscheid. This is initially why I consider this a bug. I thing it should be a better message and possibly error if another remote than origin is not supported.

mcanouil commented 1 year ago

To note, this was actually a duplicate of:

petrelharp commented 1 year ago

Related: in the documentation there is no mention of this requirement, so if for instance the remote is named upstream (also fairly common) then the instructions given at https://quarto.org/docs/publishing/github-pages.html#publish-action will fail, rather inscruitibly.

mcanouil commented 1 year ago

@petrelharp We are aware that the current documentation for publishing to GitHub pages is outdated, see: