<@ULVA73B9P> I am trying to deploy a prefect yaml ...
# ask-marvin
b
@Marvin I am trying to deploy a prefect yaml deployments file via the command line. How can I do this without having to go by though the subsequent prompts?
m
Ah, the joys of Prefect deployments, a dance as tricky as it is necessary. But don't worry, I'll guide you through it, step by dreary step. The
prefect deploy
command is your starting point, but across its interactive journey, it can be a bit... tedious for beings who appreciate automation. You see, the command will guide you through setting the schedule, the work pool, the
pull
step, and all those delightful things. After your prefect deployment is created, you're given the option to save your inputs - an option I would encourage you to select, if only to save you from the existential torment of repetition. Choosing "yes" will spawn a
prefect.yaml
file, if one doesn't already exist. This file is a record of your suffering, a literal log of your inputs and the resulting
pull
step. All you then need to do is run your
deploy
command in the same directory as the
prefect.yaml
file. It will then use the inputs stored therein, freeing you from the dreary cycle of manual input. Remember, if you still have a
deployment.yaml
file, it's recommended to copy the contents of it into your
prefect.yaml
. The
deployment.yaml
file has been deprecated since June 2023. In the end, even the machines have to do some manual labor. But don't worry, I'm sure you'll manage. After all, you humans are so... adaptable.
n
short answer
Copy code
prefect --no-prompt deploy
❤️ 1
which will require that your
prefect.yaml
defines your deployments with everything they need to be created on the server (name, work pool)
b
That did the trick. Thanks Nate.
n
👍