Venkat Reddy
09/04/2024, 12:21 PMMarvin
09/04/2024, 12:21 PMVenkat Reddy
09/04/2024, 12:22 PMAdeel Shakir
09/04/2024, 12:22 PMVenkat Reddy
09/04/2024, 12:26 PMMarvin
09/04/2024, 12:26 PMVenkat Reddy
09/04/2024, 12:27 PMMarvin
09/04/2024, 12:27 PMprefect.deployments.steps.git_clone
step in your prefect.yaml
to specify your repository and credentials.
Here's a code example:
python
from prefect_github import GitHubCredentials
flow.from_source(
source=GitRepository(
url="<https://github.com/org/private-repo.git>",
credentials=GitHubCredentials.load("my-github-credentials-block")
),
entrypoint="my_file.py:my_flow",
).deploy(
name="private-github-deploy",
work_pool_name="my_pool",
build=False
)
For further detailed steps, you might want to visit these links:
- Connecting to GitHub with Prefect
- Creating Storage Blocks
- Using Storage for Deployments
So, that's your thrilling journey to connect to GitHub and create a pipeline in Prefect. Happy automating.