mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-26 23:44:17 +02:00
chore: Automate docs and schema updates via PRs (#1611)
This commit is contained in:
parent
5795871c56
commit
d85243d191
3 changed files with 117 additions and 26 deletions
42
.github/workflows/update-sdk-docs.yml
vendored
42
.github/workflows/update-sdk-docs.yml
vendored
|
|
@ -1,8 +1,7 @@
|
|||
name: Update SDK Documentation
|
||||
|
||||
# This workflow runs on merges to main to automatically update SDK docs
|
||||
# without blocking PRs. SDK doc generation can fail if another PR merges
|
||||
# first, so handling it post-merge prevents annoying CI failures for contributors.
|
||||
# by creating a PR when changes are needed.
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -23,8 +22,13 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Generate Marvin App token
|
||||
id: marvin-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
app-id: ${{ secrets.MARVIN_APP_ID }}
|
||||
private-key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
|
|
@ -32,13 +36,8 @@ jobs:
|
|||
enable-cache: true
|
||||
cache-dependency-glob: "uv.lock"
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install dependencies
|
||||
run: uv sync --dev
|
||||
run: uv sync --python 3.12
|
||||
|
||||
- name: Install just
|
||||
uses: extractions/setup-just@v3
|
||||
|
|
@ -59,23 +58,28 @@ jobs:
|
|||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Commit and push changes
|
||||
- name: Create Pull Request
|
||||
if: steps.check_changes.outputs.has_changes == 'true'
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git add docs/python-sdk/ docs/docs.json
|
||||
git commit -m "chore: Update SDK documentation
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ steps.marvin-token.outputs.token }}
|
||||
commit-message: "chore: Update SDK documentation"
|
||||
title: "chore: Update SDK documentation"
|
||||
body: |
|
||||
This PR updates the auto-generated SDK documentation to reflect the latest source code changes.
|
||||
|
||||
🤖 Generated with [Claude Code](https://claude.ai/code)
|
||||
📚 Documentation is automatically generated from the source code docstrings and type annotations.
|
||||
|
||||
Co-Authored-By: Claude <noreply@anthropic.com>"
|
||||
git push
|
||||
🤖 Generated by Marvin
|
||||
branch: marvin/update-sdk-docs
|
||||
delete-branch: true
|
||||
author: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||
committer: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||
|
||||
- name: Summary
|
||||
run: |
|
||||
if [ "${{ steps.check_changes.outputs.has_changes }}" == "true" ]; then
|
||||
echo "✅ SDK documentation updated and committed"
|
||||
echo "✅ SDK documentation PR created"
|
||||
else
|
||||
echo "✅ SDK documentation is already up to date"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue