docs: 自动提交抓取的 issues md 文件
This commit is contained in:
parent
1015736635
commit
681b65815a
25
.github/workflows/static.yml
vendored
25
.github/workflows/static.yml
vendored
@ -5,6 +5,11 @@ on:
|
|||||||
# Runs on pushes targeting the default branch
|
# Runs on pushes targeting the default branch
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
paths:
|
||||||
|
- 'docs/**' # Only trigger on changes in the docs directory
|
||||||
|
# Runs on issue events
|
||||||
|
issues:
|
||||||
|
types: [opened, edited, reopened] # Specify events you're interested in
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -46,6 +51,26 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npm run docs:build
|
npm run docs:build
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
id: check_changes
|
||||||
|
run: |
|
||||||
|
if [ -n "$(git diff docs/issues)" ]; then
|
||||||
|
echo "changed=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "changed=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
# Optionally, customize the user name and commit message, and can add an email as well such as Github Actions' email
|
||||||
|
- name: Set up Git and Commit Changes
|
||||||
|
run: |
|
||||||
|
if [ "${{ steps.check_changes.outputs.changed }}" == "true" ]; then
|
||||||
|
git config --local user.name "Issues Docs [BOT]"
|
||||||
|
git add .
|
||||||
|
git commit -m "Auto-Generate docs 🤖"
|
||||||
|
git push
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v5
|
uses: actions/configure-pages@v5
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
Loading…
Reference in New Issue
Block a user