-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (36 loc) · 1.15 KB
/
Copy pathgenerate-tools-docs.yml
File metadata and controls
42 lines (36 loc) · 1.15 KB
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
name: Generate Tools Documentation
on:
push:
branches: [ main, develop ]
paths:
- '.opencode/agents/**'
- '.opencode/skills/**'
- '.opencode/commands/**'
- 'scripts/generate-tools-docs.sh'
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: false
jobs:
generate-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Run tools documentation generation script
run: bash ./scripts/generate-tools-docs.sh
- name: Commit and push documentation if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/tools-reference.md
if git diff --cached --quiet; then
echo "Documentation unchanged, skipping commit and push"
else
git commit -m "docs: update tools reference documentation [skip ci]"
git fetch origin
git rebase origin/${{ github.ref_name }}
git push origin ${{ github.ref_name }}
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}