diff --git a/.gitea/workflows/sgeupdated.yml b/.gitea/workflows/sgeupdated.yml index e3cf264..1e8a5ee 100644 --- a/.gitea/workflows/sgeupdated.yml +++ b/.gitea/workflows/sgeupdated.yml @@ -1,15 +1,15 @@ name: sgeUpdated CI/CD on: - pull_request: - types: - - closed # Fires when a PR is closed (either merged or manually closed) + push: branches: - - main # Only when PR targets main - + - main + pull_request: + branches: + - main + jobs: deploy: - if: github.event.pull_request.merged == true # Run only if the PR was merged (not just closed) runs-on: ubuntu-latest steps: @@ -23,7 +23,7 @@ jobs: - name: Run deploy script on server run: | ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF' - echo "✅ PR merged into main — running deploy script..." + echo "✅ Connected to server. Running deploy script..." cd /home/ubuntu/Bgreen/sgeUpdated ./deploy.sh EOF