When using the `publish` [action on GHA as per documentation](https://quarto.org/docs/publishing/github-pages.html#publish-action), I ended up with the following error:

`ERROR: No _publish.yml file available (_publish.yml specifying a destination required for non-interactive publish)`.

As it turns out, the actual problem was that `quarto publish gh-pages` had not been run locally, as the [documentation for the action](https://github.com/quarto-dev/quarto-actions/tree/main/publish#github-pages) suggests one does before running the action. After doing this, the action ran as expected, without the need for any other tweaks and also without needing to include a `_publish.yml` file.

It would be helpful if

1. the error message were improved to point to the actual problem (probably a missing `gh-pages` branch?)
2. the [Quarto doc](https://quarto.org/docs/publishing/github-pages.html#publish-action) explicitly included the instruction to first run `quarto publish gh-pages` locally.
cscheid
2023-01-31T16:33:04Z
petrbouchal
documentation
v1.4
open
GHA to Github Pages: misleading error + need for documentation
https://github.com/quarto-dev/quarto-cli/issues/4498