Files
deployer/deploy.py
2025-01-07 18:37:10 -05:00

22 lines
441 B
Python

from dataclasses import dataclass
import subprocess
import os
@dataclass
class DeployerRequest:
repo: str
branch: str
commit_hash: str
def handle_request(rq: DeployerRequest):
subprocess.run(
["./deploy.sh"],
env=dict(
os.environ,
REPO=rq.repo,
BRANCH=rq.branch,
COMMIT_HASH=rq.commit_hash,
),
)