ci: 工作流

This commit is contained in:
Rock Chin
2023-04-06 15:18:02 +08:00
parent 21ff0fd258
commit 0dfd636a7e
+23 -18
View File
@@ -1,26 +1,31 @@
name: Sync Wiki on Update name: Update Wiki
on: on:
push: push:
paths: paths:
- 'res/wiki/**' - 'res/wiki/**'
jobs: jobs:
build: update-wiki:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout QChatGPT.wiki - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: - name: Setup Git
repository: RockChinQ/QChatGPT.wiki run: |
ref: main git config --global user.name "GitHub Actions"
path: wiki git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Copy updated files - name: Clone Wiki Repository
run: cp -R res/wiki/* wiki/ uses: actions/checkout@v2
- name: Commit and push changes with:
run: | repository: RockChinQ/QChatGPT.wiki
cd wiki/ path: wiki
git config --global user.name "GitHub Action" - name: Copy res/wiki content to wiki
git config --global user.email "action@github.com" run: |
git add -A cp -r res/wiki/* wiki/
git commit -m "Sync Wiki on update" - name: Commit and Push Changes
git push run: |
cd wiki
git add .
git commit -m "Update wiki"
git push