Hi all, beginner's question on the topic of deploy...
# prefect-getting-started
k
Hi all, beginner's question on the topic of deployment: I have a flow hosted on Github and I would like to register it as a deployment on prefect cloud through a Github action. My prefect.yaml is already generated, how can I "apply" it through a Github action. More explicitly, before using prefect.yaml, my Github action had the following run command: 1. prefect deployment run ........ 2. prefect deployment apply ...... How can I do the same, using a predefined prefect.yaml ? I have looked into https://github.com/PrefectHQ/actions-prefect-deploy But this default action seems to re-generate a new prefect.yaml not using the one I initialized. Many thanks for your help
n
hi keven. you can run “prefect —no-prompt deploy —all” in your github action, and that will step through your prefect.yaml and deploy them all. alternatively, you can call “prefect —no-prompt deploy -n name-as-defined-in-prefect-yaml” to do them one at a time if you need.
j
hi Keven! that action shouldn’t be recreating your perfect.yaml file when called. can you share what you’re seeing?
k
Hi ! Thanks a lot for the fast and helpful answers! It works nicely with
prefect —no-prompt deploy -n _flow_name_
. The error I got with the Github prefect action was:
Copy code
An entrypoint must be provided:

prefect deploy path/to/file.py:flow_function
...Even though I had my entrypoint specified in the prefect.yaml. So my assumption was that this file was re-created on-the-fly by the github action instead of using the one we filled. Anyway the prefect command deploy --no-prompt is exactly what I was looking for, many thanks!