See https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 for more info