Skip to content

feat: modernize tool system with schema validation, caching, and enha… #45

feat: modernize tool system with schema validation, caching, and enha…

feat: modernize tool system with schema validation, caching, and enha… #45

Workflow file for this run

name: Update Documentation
on:
# Trigger on pushes to main branch
push:
branches: [ main ]
paths:
- 'src/**'
- 'README.md'
- 'typedoc.json'
- 'package.json'
# Allow manual trigger
workflow_dispatch:
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Use a personal access token to allow pushing back to the repo
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Generate documentation
run: |
# Generate TypeDoc documentation with error checking disabled for problematic files
npx typedoc src/foundry/client.ts src/foundry/types.ts src/config/index.ts src/utils/logger.ts \
--out docs \
--name "FoundryVTT MCP Server Documentation" \
--readme README.md \
--skipErrorChecking \
--cleanOutputDir
- name: Check for documentation changes
id: docs-changes
run: |
git add docs/
if git diff --staged --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push documentation updates
if: steps.docs-changes.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs/
git commit -m "📚 Update documentation
Auto-generated by GitHub Action
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>"
git push
- name: Create documentation summary
if: steps.docs-changes.outputs.changed == 'true'
run: |
echo "## 📚 Documentation Updated" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "The TypeDoc documentation has been regenerated and committed to the repository." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### 📁 Generated Files:" >> $GITHUB_STEP_SUMMARY
echo "- API documentation for FoundryClient class" >> $GITHUB_STEP_SUMMARY
echo "- TypeScript interface documentation" >> $GITHUB_STEP_SUMMARY
echo "- Configuration and utility documentation" >> $GITHUB_STEP_SUMMARY
echo "- Usage examples and code samples" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "View the documentation by browsing the \`docs/\` folder in the repository." >> $GITHUB_STEP_SUMMARY