Does deploy to render button works in sub-directories?

Is it important to have render.yaml at the root directory (repository)?

Can we do something like this?

<a href="">
  <img src="">

And the render name folder can have render.yaml file.

The render.yaml file must go in the root directory as detailed in our IaC doc: Infrastructure as Code (IaC) | Render

Maybe it’s worth mentioning here that you can specify the branch in the URL’s query string along with the repo.