mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-blog.git
synced 2026-07-03 15:41:26 +00:00
Merge remote-tracking branch 'origin/master' into blog-content
This commit is contained in:
commit
80f1f77d91
2 changed files with 45 additions and 13 deletions
21
.github/workflows/deploy-blog.yml
vendored
21
.github/workflows/deploy-blog.yml
vendored
|
|
@ -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:
|
||||||
|
|
|
||||||
37
.github/workflows/sync-master-to-blog-content.yml
vendored
Normal file
37
.github/workflows/sync-master-to-blog-content.yml
vendored
Normal 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
|
||||||
Loading…
Reference in a new issue