diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml index 201855f..c23a423 100644 --- a/.github/workflows/prod.yaml +++ b/.github/workflows/prod.yaml @@ -11,7 +11,9 @@ on: jobs: deploy: - if: github.event.pull_request.merged == true || github.event_name == 'push' + if: > + (github.event_name == 'push' && !contains(github.event.head_commit.message, 'Merge pull request')) || + (github.event_name == 'pull_request' && github.event.pull_request.merged == true) runs-on: ubuntu-latest env: DB: PROD @@ -34,7 +36,6 @@ jobs: - name: Install Rye run: | curl -sSf https://rye.astral.sh/get | bash - echo "$HOME/.rye/shims" >> $GITHUB_PATH - name: Install dependencies run: rye sync diff --git a/.github/workflows/staging.yaml b/.github/workflows/staging.yaml index 1532f27..5d77302 100644 --- a/.github/workflows/staging.yaml +++ b/.github/workflows/staging.yaml @@ -11,7 +11,9 @@ on: jobs: deploy: - if: github.event.pull_request.merged == true || github.event_name == 'push' + if: > + (github.event_name == 'push' && !contains(github.event.head_commit.message, 'Merge pull request')) || + (github.event_name == 'pull_request' && github.event.pull_request.merged == true) runs-on: ubuntu-latest env: DB: STAGE @@ -34,7 +36,6 @@ jobs: - name: Install Rye run: | curl -sSf https://rye.astral.sh/get | bash - echo "$HOME/.rye/shims" >> $GITHUB_PATH - name: Install dependencies run: rye sync