@devries-cameron20 / composio Mirror · read-only / commits / 7bf9f9ddc
Fork 0

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

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 08:15 UTC

ci: add docs health check workflow (testing)

Temporary test commit with a fake 404 endpoint to verify Slack alerting works. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmithamallesh committed Feb 17, 2026 at 18:08 UTC 7bf9f9ddce60b5de9dfb4f82dbdcd87975cd58fb
1 file changed +111
.github/workflows/docs.health-check.yml new
+111
@@ -0,0 +1,111 @@
1 +name: Docs Health Check
2 +
3 +on:
4 + schedule:
5 + - cron: '0 * * * *' # Every hour
6 + workflow_dispatch: # Manual trigger
7 +
8 +jobs:
9 + health-check:
10 + name: Check docs accessibility
11 + runs-on: ubuntu-latest
12 + steps:
13 + - name: Check endpoints
14 + id: check
15 + run: |
16 + BASE_URL="https://docs.composio.dev"
17 + FAILED=""
18 + CHECKED=0
19 +
20 + # Standard HTML endpoints
21 + ENDPOINTS=(
22 + # TODO: Remove after testing — intentional 404 to verify Slack alert
23 + "/this-page-does-not-exist-test-404"
24 +
25 + # LLM/AI agent entry points
26 + "/llms.txt"
27 + "/llms-full.txt"
28 + "/docs/quickstart.md"
29 + "/docs/tools-and-toolkits.md"
30 +
31 + # Main pages
32 + "/docs"
33 + "/docs/quickstart"
34 + "/docs/authentication"
35 + "/docs/tools-and-toolkits"
36 + "/docs/users-and-sessions"
37 + "/docs/configuring-sessions"
38 + "/cookbooks"
39 + "/toolkits"
40 + "/reference"
41 +
42 + # Provider pages
43 + "/docs/providers/openai"
44 + "/docs/providers/vercel"
45 + "/docs/providers/anthropic"
46 +
47 + # Key sub-pages
48 + "/docs/tools-direct/fetching-tools"
49 + "/docs/tools-direct/executing-tools"
50 + "/docs/authenticating-users/in-chat-authentication"
51 + "/docs/common-faq"
52 + )
53 +
54 + # Endpoints to also test with Accept: text/markdown
55 + MARKDOWN_ENDPOINTS=(
56 + "/docs/quickstart"
57 + "/docs/tools-and-toolkits"
58 + "/docs/authentication"
59 + "/docs/providers/openai"
60 + "/cookbooks"
61 + )
62 +
63 + for endpoint in "${ENDPOINTS[@]}"; do
64 + CHECKED=$((CHECKED + 1))
65 + STATUS=$(curl -sL -o /dev/null -w "%{http_code}" --max-time 15 "${BASE_URL}${endpoint}" || echo "000")
66 +
67 + if [ "$STATUS" -ge 400 ] || [ "$STATUS" = "000" ]; then
68 + echo "FAIL: ${endpoint} → HTTP ${STATUS}"
69 + FAILED="${FAILED}\n• \`${endpoint}\` → HTTP ${STATUS}"
70 + else
71 + echo "OK: ${endpoint} → HTTP ${STATUS}"
72 + fi
73 + done
74 +
75 + for endpoint in "${MARKDOWN_ENDPOINTS[@]}"; do
76 + CHECKED=$((CHECKED + 1))
77 + STATUS=$(curl -sL -o /dev/null -w "%{http_code}" --max-time 15 -H "Accept: text/markdown" "${BASE_URL}${endpoint}" || echo "000")
78 +
79 + if [ "$STATUS" -ge 400 ] || [ "$STATUS" = "000" ]; then
80 + echo "FAIL: ${endpoint} (Accept: text/markdown) → HTTP ${STATUS}"
81 + FAILED="${FAILED}\n• \`${endpoint}\` (Accept: text/markdown) → HTTP ${STATUS}"
82 + else
83 + echo "OK: ${endpoint} (Accept: text/markdown) → HTTP ${STATUS}"
84 + fi
85 + done
86 +
87 + if [ -n "$FAILED" ]; then
88 + echo "has_failures=true" >> $GITHUB_OUTPUT
89 + echo "checked=$CHECKED" >> $GITHUB_OUTPUT
90 +
91 + PAYLOAD=$(jq -n \
92 + --arg failed "$FAILED" \
93 + --arg checked "$CHECKED" \
94 + --arg run_url "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
95 + '{text: ("🚨 *Docs Health Check Failed*\n\nSome endpoints returned errors. These are URLs that Claude Code / Codex hit when accessing our docs.\n\n*Failing endpoints:*" + $failed + "\n\n_Checked " + $checked + " endpoints total_\n<" + $run_url + "|View run>")}')
96 +
97 + echo "slack_payload<<EOF" >> $GITHUB_OUTPUT
98 + echo "$PAYLOAD" >> $GITHUB_OUTPUT
99 + echo "EOF" >> $GITHUB_OUTPUT
100 + else
101 + echo "has_failures=false" >> $GITHUB_OUTPUT
102 + echo "All $CHECKED endpoints healthy"
103 + fi
104 +
105 + - name: Notify Slack
106 + if: steps.check.outputs.has_failures == 'true'
107 + uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1
108 + with:
109 + payload: ${{ steps.check.outputs.slack_payload }}
110 + env:
111 + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_POD_DX_WEBHOOK_URL }}