Repo with the details for 11/7 Prefect stream about using Github Actions to deploy your Prefect flows
- Add PREFECT_API_KEY and PREFECT_API_URL as secrets to your GitHub repo for use by the GitHub Action (Settings > Secrets > Actions). NOTE: You can see your api key and your api url for a given workspace after logging in to your cli (
prefect cloud login
) withprefect config view
.) - Create a GitHub Block in Prefect Cloud referencing your repo and the target branch.
- Copy
.github/workflows/cloud-deployment.yaml
to your repo and update it to reference your flow. Set the storage block (--sb
) to the slug of your Github Block from step 2. Change the other flags like the tags and work queue to your preference. - Create a
requirements.txt
in your repo's root directory; make sure to updaterequirements.txt
if your flow needs access to more python packages.