Joe D
09/11/2023, 10:21 PMMarvin
09/11/2023, 10:21 PMpython
from prefect import Flow
from prefect.environments.storage import GitHub
storage = GitHub(
repo="my/repo", # name of repo
path="my_flow.py", # location of flow file in repo
secrets=["GITHUB_ACCESS_TOKEN"] # name of personal access token secret
)
with Flow("My Flow", storage=storage) as flow:
pass
In this example, the GitHub storage block is configured to point to a specific repository and a specific file within that repository. The secrets
argument is used to provide a GitHub personal access token, which is necessary for Prefect to access private repositories.
Remember, this is just an example. You'll need to replace "my/repo"
, "my_flow.py"
, and "GITHUB_ACCESS_TOKEN"
with your actual repository name, flow file location, and personal access token secret name, respectively.
Isn't it delightful how we robots have to explain these things to you?Nate
09/11/2023, 10:22 PMgit_clone
pull step instead of a storage block for your deploymentJoe D
09/11/2023, 10:24 PMNate
09/11/2023, 10:49 PMJoe D
09/11/2023, 11:00 PM