Closed dragonstyle closed 7 months ago
This new message seems to come from:
I think the issue is that quarto publish
methods are not really independent as they initially shared an obscure error message for instance about the missing config file for Quarto Pub even when publishing to GitHub Pages.
There is probably some refactoring to plan on the publish sub-routines.
I think this check might just need to be deferred to a later time once the user has elected to publish to gh-pages. I reviewed that PR so my bad of not catching it!
What i still don't understand is why quarto publish
which is able to create gh-pages
needs to be run locally first while in GitHub Actions, setting contents: write
should allow to write branches but here Quarto will fail.
The first version of quarto publish
did not create gh-pages
so the error made sense at that time, but now it basically causes headaches to several users without obvious reasons at least to me.
Oups. I really thought by adding this in the a function tied to github page publishing this would be ok... my bad. I'll fix this !
What i still don't understand is why quarto publish which is able to create gh-pages needs to be run locally first while in GitHub Actions, setting contents: write should allow to write branches but here Quarto will fail.
We only do the branch creation when prompt is opt-in so not when --no-prompt
. This is a design choice to only allow quarto publish
to create the gh-branch on a user's confirmation at command line.
The first version of quarto publish did not create gh-pages so the error made sense at that time, but now it basically causes headaches to several users without obvious reasons at least to me.
When it did not create the branch, it would still fail on publishing right ? It seem we just need to clarify the code path used for each publishing provider so that we error accordingly
The error was added in the publishRecord()
function from the github pages provider
https://github.com/quarto-dev/quarto-cli/blob/27983066d0bfb5e5057c1deed6808f20c23c42a1/src/publish/gh-pages/gh-pages.ts#L38-L51
but it seems we call this even before choosing the deployment. I'll try to adapt
Ok so we do check all the providers records when no is providing. I missed that. https://github.com/quarto-dev/quarto-cli/blob/27983066d0bfb5e5057c1deed6808f20c23c42a1/src/command/publish/deployment.ts#L112-L126
PR is up . Fix is to indeed defer to a later time and only throw when gh-pages is chosen as publishing provider.
I'm attempting to test publish to confluence, but if I do:
I receive an error about a missing gh-pages branch before even selecting the publishing target