chore: fix branches workflow

This commit is contained in:
Hintay 2024-07-27 14:51:34 +09:00
parent e65ce0d87e
commit e3b0c392ab
No known key found for this signature in database
GPG key ID: 120FC7FF121F2F2D

View file

@ -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