@devries-cameron20 / composio Mirror · read-only / commits / 914bf0290
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, 23:15 UTC

feat: add workflow to check for broken links in documentation

balyan.sid@gmail.com committed Jun 25, 2025 at 17:01 UTC 914bf029011f0d766439ed94cfdf4011d82eb281
1 file changed +69
.github/workflows/check_broken_links.yml new
+69
@@ -0,0 +1,69 @@
1 +name: Check Broken Links
2 +
3 +on:
4 + pull_request:
5 + paths:
6 + - 'fern/**'
7 + push:
8 + branches:
9 + - master
10 + - next
11 +
12 +jobs:
13 + check-broken-links:
14 + runs-on: ubuntu-latest
15 + container:
16 + image: ghcr.io/composiohq/dev-base:latest
17 + permissions: read-all
18 + env:
19 + COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY_PROD }}
20 +
21 + steps:
22 + - name: Checkout repository
23 + uses: actions/checkout@v4
24 +
25 + - name: Install dependencies
26 + run: pnpm install
27 +
28 + - name: Install git
29 + run: |
30 + apt-get update && apt-get install -y git
31 +
32 + - name: Install Python Dependencies
33 + working-directory: ./fern
34 + run: |
35 + uv sync
36 + uv pip install ../python
37 +
38 + - name: Install Fern
39 + run: npm install -g fern-api
40 +
41 + - name: Build documentation with Turbo
42 + working-directory: ./fern
43 + run: pnpm turbo run build --filter=composio-docs
44 +
45 + - name: Check for broken links
46 + working-directory: ./fern
47 + run: |
48 + set +e
49 + OUTPUT=$(fern docs broken-links 2>&1)
50 + EXIT_CODE=$?
51 + set -e
52 +
53 + echo "$OUTPUT"
54 +
55 + if [ $EXIT_CODE -ne 0 ]; then
56 + echo "::error::Found broken links in documentation"
57 +
58 + # Extract and format broken links for better visibility
59 + echo ""
60 + echo "## ❌ Broken Links Found"
61 + echo ""
62 + echo "$OUTPUT" | grep -E "(broken link to|fix here:)" | while read -r line; do
63 + echo "- $line"
64 + done
65 +
66 + exit 1
67 + else
68 + echo "✅ No broken links found"
69 + fi
\ No newline at end of file