Skip to content

Commit

Permalink
Add workflow for AI documentation generation (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecgeatches authored Feb 24, 2025
1 parent 4f6e62a commit 32516b9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ai-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Generate AI Documentation

on:
push:
branches:
- 'trunk'

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
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ For plugin overview and getting started guide, see [README](../README.md).

## Additional Documentation

- [AI Documentation](ai.md)
- [Contributing Guidelines](../CONTRIBUTING.md)
- [Security Policy](../SECURITY.md)
- [Code of Conduct](https://make.wordpress.org/handbook/community-code-of-conduct/)

0 comments on commit 32516b9

Please sign in to comment.