Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 45 additions & 28 deletions .github/workflows/notify-docs-update.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,76 @@
# Template: SDK Release Documentation Notification
# SDK Release Documentation Pipeline
#
# Copy this workflow to your SDK repository and configure the SDK_TYPE variable.
# When a release is published, it will notify the sendbird-docs repository to
# generate documentation updates based on the release notes.
# When a release is published, this workflow:
# 1. Triggers docs validation (claude-docs-validation) on client-workflows
# 2. Notifies sendbird-docs to generate documentation update PRs
#
# Required setup:
# 1. Copy this file to your SDK repo: .github/workflows/notify-docs-update.yml
# 2. Update the SDK_TYPE environment variable to match your SDK
# 3. Create a GitHub Personal Access Token with 'repo' scope
# 4. Add the token as a secret named DOCS_REPO_TOKEN in your SDK repo
# Can also be triggered manually via workflow_dispatch for re-runs.
#
# SDK_TYPE options:
# - chat-sdk-javascript
# - chat-sdk-ios
# - chat-sdk-android
# - chat-sdk-flutter
# - chat-sdk-unity
# - uikit-react
# - uikit-react-native
# - uikit-ios
# - uikit-android
# - uikit-swiftui
# Required secrets:
# DOCS_REPO_TOKEN - GitHub token with repo access to sendbird-docs
# SDK_REPO_TOKEN - GitHub token with repo access to client-workflows

name: Notify Docs Repository on Release
name: Release Docs Pipeline

on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag (e.g., v3.12.0)'
required: true
type: string

env:
# UPDATE THIS: Set to your SDK type (see options above)
SDK_TYPE: uikit-react-native
PLATFORM: react-native
DOCS_REPO: sendbird/SendBird-Docs

jobs:
docs-validation:
runs-on: ubuntu-latest
steps:
- name: Trigger docs validation
uses: actions/github-script@v7
with:
github-token: ${{ secrets.SDK_REPO_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'sendbird',
repo: 'client-workflows',
workflow_id: 'claude-docs-validation.yml',
ref: 'main',
inputs: {
sdk_type: '${{ env.SDK_TYPE }}',
platform: '${{ env.PLATFORM }}',
release_tag: '${{ github.event.release.tag_name || inputs.release_tag }}',
source_repo: '${{ github.repository }}'
}
});
- name: Summary
run: |
echo "## Docs Validation Triggered" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **SDK:** ${{ env.SDK_TYPE }}" >> $GITHUB_STEP_SUMMARY
echo "- **Release:** ${{ github.event.release.tag_name || inputs.release_tag }}" >> $GITHUB_STEP_SUMMARY

notify-docs:
runs-on: ubuntu-latest
steps:
- name: Trigger documentation update
env:
GH_TOKEN: ${{ secrets.DOCS_REPO_TOKEN }}
run: |
# Extract repository info
SDK_REPO="${{ github.repository }}"
RELEASE_TAG="${{ github.event.release.tag_name }}"
RELEASE_TAG="${{ github.event.release.tag_name || inputs.release_tag }}"
RELEASE_URL="${{ github.event.release.html_url }}"

echo "Triggering docs update for:"
echo " SDK Repo: $SDK_REPO"
echo " Release Tag: $RELEASE_TAG"
echo " SDK Type: $SDK_TYPE"

# Trigger repository_dispatch event on docs repo
HTTP_STATUS=$(curl -s -o /tmp/dispatch_response.txt -w "%{http_code}" -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GH_TOKEN" \
Expand Down Expand Up @@ -79,8 +98,6 @@ jobs:
run: |
echo "## Documentation Update Triggered" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "A documentation update request has been sent to the docs repository." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **SDK:** ${{ env.SDK_TYPE }}" >> $GITHUB_STEP_SUMMARY
echo "- **Release:** ${{ github.event.release.tag_name }}" >> $GITHUB_STEP_SUMMARY
echo "- **Release:** ${{ github.event.release.tag_name || inputs.release_tag }}" >> $GITHUB_STEP_SUMMARY
echo "- **Docs Repo:** ${{ env.DOCS_REPO }}" >> $GITHUB_STEP_SUMMARY
137 changes: 0 additions & 137 deletions .github/workflows/release-docs-check.yml

This file was deleted.

Loading