Skip to content

Commit 241a88d

Browse files
ci: fix docs repo name and add error handling (#21)
- Fix incorrect docs repository name (sendbird/sendbird-docs → sendbird/SendBird-Docs) - Add HTTP status code error handling to the dispatch API call Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 34f0996 commit 241a88d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/notify-docs-update.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131
env:
3232
# UPDATE THIS: Set to your SDK type (see options above)
3333
SDK_TYPE: chat-sdk-unity
34-
DOCS_REPO: sendbird/sendbird-docs
34+
DOCS_REPO: sendbird/SendBird-Docs
3535

3636
jobs:
3737
notify-docs:
@@ -52,7 +52,7 @@ jobs:
5252
echo " SDK Type: $SDK_TYPE"
5353
5454
# Trigger repository_dispatch event on docs repo
55-
curl -X POST \
55+
HTTP_STATUS=$(curl -s -o /tmp/dispatch_response.txt -w "%{http_code}" -X POST \
5656
-H "Accept: application/vnd.github+json" \
5757
-H "Authorization: Bearer $GH_TOKEN" \
5858
-H "X-GitHub-Api-Version: 2022-11-28" \
@@ -65,9 +65,15 @@ jobs:
6565
\"sdk_type\": \"${{ env.SDK_TYPE }}\",
6666
\"release_url\": \"$RELEASE_URL\"
6767
}
68-
}"
68+
}")
6969
70-
echo "Documentation update triggered successfully!"
70+
if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then
71+
echo "Documentation update triggered successfully! (HTTP $HTTP_STATUS)"
72+
else
73+
echo "Failed to trigger documentation update (HTTP $HTTP_STATUS)"
74+
cat /tmp/dispatch_response.txt
75+
exit 1
76+
fi
7177
7278
- name: Summary
7379
run: |

0 commit comments

Comments
 (0)