diff --git a/.github/workflows/build-toc.yaml b/.github/workflows/build-toc.yaml index 03b7b3f4..05838318 100644 --- a/.github/workflows/build-toc.yaml +++ b/.github/workflows/build-toc.yaml @@ -12,7 +12,7 @@ on: jobs: run-script: runs-on: ubuntu-latest - if: github.event.pull_request.merged == true + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event.pull_request.merged == true && github.base_ref == 'main') steps: - name: Checkout repository uses: actions/checkout@v2