Getting a GitHub Action to Only Trigger on a Specific Branch The example below runs on push and delete actions on only the main branch for the repo. name: Example on: push: branches: - main delete: branches: - main jobs: example_job: runs-on: ubuntu-18.04 steps: ...