quarto-dev / quarto-r

R interface to quarto-cli
https://quarto-dev.github.io/quarto-r/
139 stars 21 forks source link

`quarto_publish_app()` always publishes `index.qmd` if that exists in the directory #24

Open mine-cetinkaya-rundel opened 2 years ago

mine-cetinkaya-rundel commented 2 years ago

Here is a directory/repo with three files:

If I run quarto::quarto_publish_app("b-with-shiny.qmd", account = "minecr"), the deployed doc is called b-with-shiny but it actually contains the contents of index.qmd: https://minecr.shinyapps.io/b-with-shiny/.

I have a-without-shiny.qmd in this repo because my original guess was that it publishes the document that comes alphabetically first, but I think it just publishes index.qmd if it exists, otherwise it publishes the correct one. This seems like a bug to me, it should publish the document provided in the call, despite index.qmd being special.

cderv commented 2 years ago

I tried quickly looking into this, but it seems to me that it behave as rsconnect::deployApp() works when passing a directory.

I believe quarto_publish_app() is aimed at deploying a shiny project (so a directory), and passing a filename into input only allows to customize appPrimaryDoc in rsconnect::deployApp() , which I think is the entry point to be considered by the publishing service.

So I wonder how you would call rsconnect::deployApp() for his usage, and why not use quarto_publish_doc() if the aim is to publish one doc only ?

I am trying here to understand how this work at the root so we can make useful wrappers.

cderv commented 6 months ago

Plan is to deprecate publish function in this package to prefer rsconnect

Do you use the rsconnect package now ? Does it works with it ?