<@U02NV4FSEJG> thanks to <@U02GMEZU18B> I got my P...
# pacc-london-2023
c
@Christopher Brown thanks to @Nate I got my Prefect to work off a local repo but it was a major pain as I had to make a local clone of the repo and deploy from the clone.
My yaml looks like
Copy code
# pull section allows you to provide instructions for cloning this project in remote locations
pull:
- prefect.deployments.steps.git_clone:
    repository: <file://C>:\\Users\\cchen1\\OneDrive - Genomics England Ltd\\Desktop\\prefect-course
    branch: master
g
If you want to have it using the ‘local’ one where your worker is running you can scope it to the deployment instead:
Copy code
# prefect.yaml

# Generic metadata about this project
name: prefect_training
prefect-version: 2.10.16

# build section allows you to manage and build docker images
build: null

# push section allows you to manage if and how this project is uploaded to remote locations
push: null

# the deployments section allows you to provide configuration for deploying flows
deployments:
  - name: main
    description: Main pipeline
    entrypoint: weather_data.py:pipeline
    parameters: {}
    work_pool:
      name: my_pool
      work_queue_name: null
      job_variables: {}
    schedule:
      cron: "*/5 * * * *" # Every 5 minutes
    pull:
      - prefect.deployments.steps.git_clone:
          repository: git@github.com:glsdown/prefect-training.git
          branch: main
          access_token:
            "{{ prefect.blocks.secret.deployment-default-load-latest-weather-forecast-repo-token
            }}"
  - name: dev
    description: Main pipeline
    entrypoint: weather_data.py:pipeline
    parameters: { "lat": 51.525752876069994, "lon": -0.12948642426707227 }
    work_pool:
      name: my_pool
      work_queue_name: null
      job_variables: {}
    schedule: null
    pull: null # local pull request
🙌 1