-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (37 loc) · 1.13 KB
/
ai-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Generate AI Documentation
on:
pull_request:
paths:
- 'docs/**'
- 'example/**'
jobs:
generate-ai-docs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install repomix
run: npm install -g repomix
- name: Generate AI documentation
run: repomix --style=markdown docs/ example/ -o docs/ai.md
- name: Check for changes
id: git-check
run: |
git add docs/ai.md
git diff --staged --quiet docs/ai.md || echo "changes=true" >> $GITHUB_OUTPUT
- name: Commit changes
if: steps.git-check.outputs.changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Docs: update AI documentation" docs/ai.md
git push