From cd01bf0af625ef0fb9bfe025f6b2e997c96ae00a Mon Sep 17 00:00:00 2001 From: Julia Turc Date: Wed, 9 Oct 2024 16:29:47 -0700 Subject: [PATCH] Update ci.yml: Handle pull for main branch --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3921b11..f877df6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,11 @@ jobs: - name: Pull latest changes run: | - git pull --rebase origin ${{ github.event.pull_request.head.ref }} + if [ "${{ github.event_name }}" = "pull_request" ]; then + git pull --rebase origin ${{ github.event.pull_request.head.ref }} + else + git pull --rebase origin main + fi - name: Push changes if: success()