From 8381fe36f8167cc3ae0d1e2c27ae5b7f1b3d0d6d Mon Sep 17 00:00:00 2001 From: Mkltkn Date: Sun, 8 Feb 2026 03:54:30 +0100 Subject: [PATCH] Update deploy workflow to trigger on push events and add concurrency control with a wait step for concurrent pushes. --- .github/workflows/deploy.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 44e2e8f4..677f510d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,8 +1,7 @@ name: Deploy to Production on: - pull_request: - types: [closed] + push: branches: [ main ] concurrency: @@ -12,13 +11,18 @@ concurrency: jobs: deploy: runs-on: self-hosted - # Sadece merge edilen PR'lar için çalış - if: github.event.pull_request.merged == true + # Son 5 saniyede başka bir workflow başladıysa bu iptal edilir + timeout-minutes: 30 defaults: run: working-directory: /home/eksicode steps: + # Kısa bir bekleme - eğer hemen ardından başka push varsa + # concurrency sayesinde bu iptal olur + - name: Wait for concurrent pushes + run: sleep 3 + - name: Pull latest changes run: git pull origin main