From ee29ecd766de0351be7359c7567d685134abc546 Mon Sep 17 00:00:00 2001 From: Abdulbari Date: Thu, 30 Oct 2025 19:35:34 +0300 Subject: [PATCH] Update .gitea/workflows/sgeupdated.yml --- .gitea/workflows/sgeupdated.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/sgeupdated.yml b/.gitea/workflows/sgeupdated.yml index b79ec70..e3cf264 100644 --- a/.gitea/workflows/sgeupdated.yml +++ b/.gitea/workflows/sgeupdated.yml @@ -3,14 +3,13 @@ name: sgeUpdated CI/CD on: pull_request: types: - - opened # When a new PR is created - - closed # When a PR is merged or manually closed + - closed # Fires when a PR is closed (either merged or manually closed) branches: - - main # The target branch of the PR + - main # Only when PR targets main jobs: deploy: - if: github.event.pull_request.merged == true || github.event.action == 'opened' + if: github.event.pull_request.merged == true # Run only if the PR was merged (not just closed) runs-on: ubuntu-latest steps: @@ -24,7 +23,7 @@ jobs: - name: Run deploy script on server run: | ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF' - echo "✅ PR event detected — running deploy script..." + echo "✅ PR merged into main — running deploy script..." cd /home/ubuntu/Bgreen/sgeUpdated ./deploy.sh EOF