how might one deploy from a relative directory? I ...
# prefect-getting-started
a
how might one deploy from a relative directory? I have my core logic in some
src/myproj/file.py
and the boilerplate for flows and configs in another
src/myproj
, and I was doing
prefect deploy ../../src/myproj/file.py:foo
. unsurprisingly this didn't work. what's the recommended pattern here? is it possible to include
src/myproj
in the
push
section of my prefect.yaml?
m
Hi @Andy Dienes not sure if this would be helpful for you but in my case I created a script on the top directory that runs with GH actions for this (see this template for reference). Maybe there's another recommended approach for this though, so let's see if someone else can provide further guidance
a
I don’t think this is possible with the YAML deployments but you can do it by using the Deployment class and supplying a flow by using importlib or by directly importing it supplying it to the deployment object declaration