From e3b0c392ab457e47cf470b3ee50b0974d2d245d3 Mon Sep 17 00:00:00 2001 From: Hintay Date: Sat, 27 Jul 2024 14:51:34 +0900 Subject: [PATCH] chore: fix branches workflow --- .github/workflows/branches.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 90e414e3..6186cbd5 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -1,4 +1,4 @@ -name: Build Documents +name: Merge Branches on: pull_request: @@ -12,11 +12,15 @@ on: jobs: merge: runs-on: ubuntu-latest - if: github.event.pull_request.merged == true || github.event.release.action == 'released' + if: github.event.pull_request.merged == true || github.event.action == 'published' steps: - - uses: actions/checkout@v4 - - name: Merge dev to main + - name: Checkout main branch + uses: actions/checkout@v4 + with: + ref: 'main' + fetch-depth: 0 + + - name: Merge dev to main branch run: | - git checkout main - git pull --no-rebase origin dev - git push origin main + git merge --ff-only -- origin/dev + git push