Skip to content

Commit 078b919

Browse files
committed
Enhance deployment function; add Git storage configuration and update output messages
1 parent a50e6af commit 078b919

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/progressive_automations_python/prefect_flows.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"""
66

77
from progressive_automations_python.desk_controller import move_to_height
8+
from prefect.runner.storage import GitRepository
89

910

1011
# =============================================================================
@@ -21,17 +22,23 @@ def deploy_move_desk_flow(deployment_name: str = "move-desk"):
2122
str: The deployment name for reference
2223
"""
2324

24-
# Create deployment using the correct API
25+
# Create deployment with Git source
2526
deployment = move_to_height.to_deployment(
2627
name=deployment_name,
27-
work_pool_name="desk-lifter-pool"
28+
work_pool_name="desk-lifter-pool",
29+
storage=GitRepository(
30+
url="https://github.com/AccelerationConsortium/progressive-automations-python.git",
31+
reference="main"
32+
),
33+
entrypoint="src/progressive_automations_python/desk_controller.py:move_to_height"
2834
)
2935

3036
# Deploy it
3137
deployment_id = deployment.apply()
3238

3339
print(f"✅ Deployment '{deployment_name}' created with ID: {deployment_id}")
3440
print(f"Work pool: desk-lifter-pool")
41+
print(f"Source: GitHub repository")
3542
print(f"To run: prefect deployment run 'move-to-height/{deployment_name}' --param target_height=30")
3643
print(f"Parameter: target_height (float, in inches)")
3744

0 commit comments

Comments
 (0)