Hi Prefect Team - Using this pull step, will we cl...
# ask-community
c
Hi Prefect Team - Using this pull step, will we clone from GitHub each flow run or just once for the deployment?
Copy code
pull:
    - prefect.deployments.steps.git_clone:
        repository: <https://github.com/org/repo.git>
        branch: "{{ prefect.blocks.string.branch-env }}"
        credentials: "{{ prefect.blocks.github-credentials.service-account-name }}"
1
n
hi @Chris Gunderson - this will clone the repo each time the worker goes to execute a flow run from a deployment
👍 1
c
Thanks @Nate. Is there a way to make a backup to S3 if GitHub is down?
n
hmm not in an out of the box way at this time, although this sounds like a good use case for writing your own custom action for example
prefect.deployments.steps.git_clone
is just a fully qualified name of a python function, so as long as your worker would have something like
your.own.custom.pull.step.action
available in its import space, you could implement such a function that calls
git_clone
and then
pull_from_s3
conditionally
c
Thanks Nate.
catjam 1