File tree Expand file tree Collapse file tree
src/progressive_automations_python Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55"""
66
77from progressive_automations_python .desk_controller import move_to_height
8- from prefect .deployments import Deployment
9- from prefect .runner .storage import GitRepository
108
119
1210# =============================================================================
@@ -23,24 +21,16 @@ def deploy_move_desk_flow(deployment_name: str = "move-desk"):
2321 str: The deployment name for reference
2422 """
2523
26- # Create deployment with Git source
27- deployment = Deployment .build_from_flow (
28- flow = move_to_height ,
24+ # Deploy using the modern flow.deploy() method
25+ deployment_id = move_to_height .deploy (
2926 name = deployment_name ,
3027 work_pool_name = "desk-lifter-pool" ,
31- storage = GitRepository (
32- url = "https://github.com/AccelerationConsortium/progressive-automations-python.git" ,
33- branch = "main"
34- ),
35- entrypoint = "src/progressive_automations_python/desk_controller.py:move_to_height"
28+ image = None , # Use default image
29+ push = False # Don't push to registry
3630 )
3731
38- # Deploy it
39- deployment_id = deployment .apply ()
40-
4132 print (f"✅ Deployment '{ deployment_name } ' created with ID: { deployment_id } " )
4233 print (f"Work pool: desk-lifter-pool" )
43- print (f"Source: GitHub repository" )
4434 print (f"To run: prefect deployment run 'move-to-height/{ deployment_name } ' --param target_height=30" )
4535 print (f"Parameter: target_height (float, in inches)" )
4636
You can’t perform that action at this time.
0 commit comments