Merge pull request #12 from ClovertaTheTrilobita/dev

feat(workflow): auto merge master to blog content
This commit is contained in:
ClovertaTheTrilobita 2026-04-13 02:09:35 +03:00 committed by GitHub
commit 6ac21acc63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 45 additions and 13 deletions

View file

@ -1,9 +1,12 @@
name: Deploy Astro Blog name: Deploy Astro Blog
on: on:
push: workflow_run:
branches: workflows:
- blog-content - Sync master into blog-content
types:
- completed
workflow_dispatch: workflow_dispatch:
@ -20,16 +23,8 @@ concurrency:
jobs: jobs:
build-and-deploy: build-and-deploy:
if: > if: >
github.event_name == 'push' || github.event_name != 'workflow_run' ||
github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
(
github.event_name == 'discussion' &&
github.event.discussion.category.slug == 'comments'
) ||
(
github.event_name == 'discussion_comment' &&
github.event.discussion.category.slug == 'comments'
)
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:

View file

@ -0,0 +1,37 @@
name: Sync master into blog-content
on:
push:
branches:
- master
permissions:
contents: write
jobs:
merge-master-into-blog-content:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Checkout blog-content
run: |
git checkout blog-content
git pull origin blog-content
- name: Merge master into blog-content
run: |
git merge origin/master --no-edit
- name: Push blog-content
run: |
git push origin blog-content