11name : Update SDK Documentation
22
33# This workflow runs on merges to main to automatically update SDK docs
4- # without blocking PRs. SDK doc generation can fail if another PR merges
5- # first, so handling it post-merge prevents annoying CI failures for contributors.
4+ # by creating a PR when changes are needed.
65
76on :
87 push :
@@ -23,22 +22,22 @@ jobs:
2322
2423 steps :
2524 - uses : actions/checkout@v5
25+
26+ - name : Generate Marvin App token
27+ id : marvin-token
28+ uses : actions/create-github-app-token@v2
2629 with :
27- token : ${{ secrets.GITHUB_TOKEN }}
30+ app-id : ${{ secrets.MARVIN_APP_ID }}
31+ private-key : ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
2832
2933 - name : Install uv
3034 uses : astral-sh/setup-uv@v6
3135 with :
3236 enable-cache : true
3337 cache-dependency-glob : " uv.lock"
3438
35- - name : Set up Python
36- uses : actions/setup-python@v5
37- with :
38- python-version : " 3.12"
39-
4039 - name : Install dependencies
41- run : uv sync --dev
40+ run : uv sync --python 3.12
4241
4342 - name : Install just
4443 uses : extractions/setup-just@v3
@@ -59,23 +58,28 @@ jobs:
5958 echo "has_changes=true" >> $GITHUB_OUTPUT
6059 fi
6160
62- - name : Commit and push changes
61+ - name : Create Pull Request
6362 if : steps.check_changes.outputs.has_changes == 'true'
64- run : |
65- git config --local user.email "[email protected] " 66- git config --local user.name "GitHub Action"
67- git add docs/python-sdk/ docs/docs.json
68- git commit -m "chore: Update SDK documentation
63+ uses : peter-evans/create-pull-request@v7
64+ with :
65+ token : ${{ steps.marvin-token.outputs.token }}
66+ commit-message : " chore: Update SDK documentation"
67+ title : " chore: Update SDK documentation"
68+ body : |
69+ This PR updates the auto-generated SDK documentation to reflect the latest source code changes.
6970
70- 🤖 Generated with [Claude Code](https://claude.ai/ code)
71+ 📚 Documentation is automatically generated from the source code docstrings and type annotations.
7172
72- Co-Authored-By: Claude <[email protected] >" 73- git push
73+ 🤖 Generated by Marvin
74+ branch : marvin/update-sdk-docs
75+ delete-branch : true
76+ author : " marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
77+ committer : " marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
7478
7579 - name : Summary
7680 run : |
7781 if [ "${{ steps.check_changes.outputs.has_changes }}" == "true" ]; then
78- echo "✅ SDK documentation updated and committed "
82+ echo "✅ SDK documentation PR created "
7983 else
8084 echo "✅ SDK documentation is already up to date"
8185 fi
0 commit comments