Open cderv opened 2 months ago
I did not expect the
quarto publish
command to require to not commit.I think we should support both workflow.
(I'm late here, but since you tagged me) This is a great change, thanks.
Thanks for the feedback.
(I'm late here, but since you tagged me)
You're not. I did not do it yet, the other PR was gh-pages only. I found this while testing.
but I'll remember to update the publishing workflow for hugging face with this
I Followed confguration steps at https://quarto.org/docs/publishing/hugging-face.html
First time publishing
Publishing a modified version
Note here that I did not know but I committed then tried to publish
And it was not working
I see in Hugging Face implementation that publish is supposed to commit src to main
We stash and fetch https://github.com/quarto-dev/quarto-cli/blob/d9bb9aa2bf8abe9eee9430aeabf3b7479721b9e3/src/publish/huggingface/huggingface.ts#L141-L145
And then we try catch for
git stash pop
https://github.com/quarto-dev/quarto-cli/blob/d9bb9aa2bf8abe9eee9430aeabf3b7479721b9e3/src/publish/huggingface/huggingface.ts#L160-L173 But if there is nothing to pop, then it will errors.So as I hinted, this is probably a workflow issue here because I committed myself the change and it seems our workflow does not support this. @cscheid is this expected ? Should we consider this workflow too or at least warn ? We could detect unpushed changes with
git diff --quiet main origin/main
after the fetchI don't work with hugging face, but it seemed quite common to commit the change in a project as HuggingFaces is using
main
branch. Working on the project in any IDE will change changes to src.I did not expect the
quarto publish
command to require to not commit.I think we should support both workflow. I can work on a PR.
Some other notes (but other issue maybe:
--no-prompt
requires a publish YAML which does not exist the first time - like gh-pages maybe?)So when going back to reverting and publishing it works
Though it is quite verbose, and we could probably hide some git log here.
Originally posted by @cderv in https://github.com/quarto-dev/quarto-cli/issues/9648#issuecomment-2134825792