Skip to content

Commit e3b0c39

Browse files
committed
chore: fix branches workflow
1 parent e65ce0d commit e3b0c39

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/branches.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Documents
1+
name: Merge Branches
22

33
on:
44
pull_request:
@@ -12,11 +12,15 @@ on:
1212
jobs:
1313
merge:
1414
runs-on: ubuntu-latest
15-
if: github.event.pull_request.merged == true || github.event.release.action == 'released'
15+
if: github.event.pull_request.merged == true || github.event.action == 'published'
1616
steps:
17-
- uses: actions/checkout@v4
18-
- name: Merge dev to main
17+
- name: Checkout main branch
18+
uses: actions/checkout@v4
19+
with:
20+
ref: 'main'
21+
fetch-depth: 0
22+
23+
- name: Merge dev to main branch
1924
run: |
20-
git checkout main
21-
git pull --no-rebase origin dev
22-
git push origin main
25+
git merge --ff-only -- origin/dev
26+
git push

0 commit comments

Comments
 (0)