fix: trying to fix auto-pulls 9 !

This commit is contained in:
2026-02-27 05:37:21 +02:00
parent 02a353a80c
commit db2c67747d
2 changed files with 12 additions and 1 deletions

View File

@@ -43,7 +43,13 @@ async def deploy(request: Request):
logger.info("Auto-deploy triggered via Gitea webhook")
project_path = settings.deploy_project_path
cmd = f"git config --global --add safe.directory {project_path} && cd {project_path} && git pull origin main && docker compose up -d --build"
cmd = (
f"git config --global --add safe.directory {project_path} && "
f"cd {project_path} && "
f"git fetch origin main && "
f"git reset --hard origin/main && "
f"docker-compose up -d --build"
)
try:
proc = await asyncio.create_subprocess_shell(
cmd,