Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

feat(docs): add workflow to update data on Apollo deploy

Sushmithamallesh48ff15164dca
diff --git a/.github/workflows/docs-update-data.yml b/.github/workflows/docs-update-data.yml
new file mode 100644
index 000000000..a40e4a797
--- /dev/null
+++ b/.github/workflows/docs-update-data.yml
@@ -0,0 +1,88 @@
+name: Docs - Update Data
+
+on:
+ repository_dispatch:
+ types: [apollo-production-deploy]
+ workflow_dispatch:
+ inputs:
+ create_pr:
+ description: 'Create PR instead of direct commit'
+ required: false
+ default: 'true'
+ type: choice
+ options:
+ - 'true'
+ - 'false'
+
+jobs:
+ update-data:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: ./docs
+ permissions:
+ contents: write
+ pull-requests: write
+ env:
+ COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v6
+
+ - name: Log trigger source
+ run: |
+ echo "Workflow triggered by: ${{ github.event_name }}"
+ if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
+ echo "Triggered by Apollo production deployment"
+ echo "Hermes commit: ${{ github.event.client_payload.hermes_commit }}"
+ echo "Timestamp: ${{ github.event.client_payload.timestamp }}"
+ fi
+
+ - name: Setup Bun
+ uses: oven-sh/setup-bun@v2
+ with:
+ bun-version-file: '.bun-version'
+
+ - name: Install dependencies
+ run: bun install
+
+ - name: Generate toolkits data
+ run: bun run generate:toolkits
+
+ - name: Fetch OpenAPI spec
+ run: bun run scripts/fetch-openapi.mjs
+
+ - name: Check for changes
+ id: changes
+ run: |
+ cd ..
+ if git diff --quiet docs/public/data/ docs/public/openapi.json 2>/dev/null; then
+ echo "has_changes=false" >> $GITHUB_OUTPUT
+ echo "No changes detected"
+ else
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "Changes detected:"
+ git diff --stat docs/public/data/ docs/public/openapi.json 2>/dev/null || true
+ fi
+
+ - name: Create Pull Request
+ if: steps.changes.outputs.has_changes == 'true' && (github.event_name == 'repository_dispatch' || inputs.create_pr == 'true')
+ uses: peter-evans/create-pull-request@v7
+ with:
+ commit-message: 'docs: update toolkits and API data'
+ title: 'docs: Update toolkits and API data'
+ body: |
+ Auto-generated update from Apollo production deployment.
+
+ This PR updates:
+ - `docs/public/data/toolkits.json` - Full toolkit data
+ - `docs/public/data/toolkits-list.json` - Light toolkit list
+ - `docs/public/openapi.json` - OpenAPI specification
+
+ ${{ github.event_name == 'repository_dispatch' && format('Hermes commit: {0}', github.event.client_payload.hermes_commit) || '' }}
+ branch: docs/auto-update-data
+ base: next
+ add-paths: |
+ docs/public/data/
+ docs/public/openapi.json