Here is a directory/repo with three files:
a-without-shiny.qmd: Quarto doc without Shiny
b-with-shiny.qmd: Quarto doc with Shiny
index.qmd: Quarto doc without Shiny
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.