https://prefect.io logo
Title
j

John Mizerany

05/26/2023, 1:27 PM
When using projects for multi-deployments, it looks like I should be able to have my deployment.yaml file in the parent directory of all the project folders; however, when I try to deploy I get the following error (i’ll put it in the thread)
1
line 186, in deploy
    with open("prefect.yaml", "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'prefect.yaml'
I have the following folder structure: flows / project_1 / flow.py prefect.yaml deployment.yaml I know it’s looking for that
prefect.yaml
file, but does the deployment.yaml file have to be in the same directory?
a

alex

05/26/2023, 1:35 PM
Yep! The
prefect.yaml
file should also be at the root of the project.
j

John Mizerany

05/26/2023, 1:36 PM
Gotcha. I was following this example: https://github.com/PrefectHQ/actions-prefect-deploy/tree/main/examples/multi-deployment Which shows that the prefect.yaml file can be in the sub directory
a

alex

05/26/2023, 1:38 PM
Ah, we’ll need to update that example. Thanks for bringing that to our attention!
j

John Mizerany

05/26/2023, 1:39 PM
No problem. So if I have multiple projects what would be the best route? So essentially each project can have it’s own deployment.yaml file?
a

alex

05/26/2023, 2:15 PM
Yep, multiple nested deployment.yaml and prefect.yaml files would also be a pattern that works. You’ll need to execute
prefect deploy
from each of those nested directories if your decide to use that pattern.
j

John Mizerany

05/26/2023, 2:23 PM
Okay that sounds great. Thank you!