Only run CI for main branch & merge requests
Previously a pipeline was created both when a branch was pushed and when a merge request was created for that branch, which was both wasteful and caused a delay in the second pipeline completing.
See https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html#use-rules-to-add-jobs