Sync Deep Agents signatures #72
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Sync Deep Agents signatures | |
| on: | |
| schedule: | |
| # Daily at 9:00 AM UTC | |
| - cron: "0 9 * * 1-5" | |
| workflow_dispatch: {} | |
| jobs: | |
| sync: | |
| name: Sync snippet signatures | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python 3.13 + uv | |
| uses: "./.github/actions/uv_setup" | |
| with: | |
| python-version: "3.13" | |
| - name: Update signature snippets from reference docs | |
| run: | | |
| uv run python scripts/sync_deepagents_signatures.py | |
| - name: Create PR with changes | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| if git diff --quiet src/snippets/create-deep-agent-config-options-py.mdx src/snippets/create-deep-agent-config-options-js.mdx; then | |
| echo "No changes to commit" | |
| exit 0 | |
| fi | |
| BRANCH_NAME="chore/sync-deepagents-signatures-$(date +%Y%m%d-%H%M%S)" | |
| git checkout -b "$BRANCH_NAME" | |
| git add src/snippets/create-deep-agent-config-options-py.mdx src/snippets/create-deep-agent-config-options-js.mdx | |
| git commit -m "$(cat <<'EOF' | |
| chore: sync deepagents signatures | |
| Sync Deep Agents signature snippets from reference.langchain.com. | |
| EOF | |
| )" | |
| git push origin "$BRANCH_NAME" | |
| gh pr create \ | |
| --title "chore: sync deepagents signatures" \ | |
| --body "$(cat <<'EOF' | |
| ## Summary | |
| Sync Deep Agents signature snippets from reference.langchain.com. | |
| ## Details | |
| - Updates `src/snippets/create-deep-agent-config-options-py.mdx` from the Python reference signature | |
| - Updates `src/snippets/create-deep-agent-config-options-js.mdx` from the JavaScript reference signature | |
| - Generated by GitHub Actions workflow `sync-deepagents-signatures.yml` | |
| 🤖 This PR was created automatically by GitHub Actions | |
| EOF | |
| )" \ | |
| --base main \ | |
| --head "$BRANCH_NAME" |