Skip to content

Add workflow to trigger docs-internal SDK sync on docs changes#1461

Draft
sunbrye wants to merge 1 commit into
mainfrom
sunbrye/trigger-docs-sync
Draft

Add workflow to trigger docs-internal SDK sync on docs changes#1461
sunbrye wants to merge 1 commit into
mainfrom
sunbrye/trigger-docs-sync

Conversation

@sunbrye
Copy link
Copy Markdown
Collaborator

@sunbrye sunbrye commented May 27, 2026

GitHub Copilot generated this pull request.

Summary

Adds a GitHub Actions workflow that automatically triggers the docs-internal SDK sync pipeline whenever files in docs/ change on main.

How it works

  1. A push to main that touches docs/** triggers this workflow
  2. The workflow sends a repository_dispatch event (type: sync-sdk-docs) to github/docs-internal
  3. The docs-internal sync workflow picks up the event, clones this repo, normalizes the docs, and opens a PR

Setup needed

TODO: Create a repository secret named DOCS_INTERNAL_PAT with a PAT that has contents:write access to github/docs-internal. Alternatively, switch to a GitHub App token for better security (no long-lived credentials to rotate).

Related

When docs/ files change on main, this workflow dispatches a
repository_dispatch event to github/docs-internal, which triggers
the Copilot SDK docs sync pipeline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment on lines +14 to +30
runs-on: ubuntu-latest
steps:
- name: Dispatch sync to docs-internal
uses: peter-evans/repository-dispatch@v3
with:
# TODO: Create a repository secret named DOCS_INTERNAL_PAT
# with a PAT that has contents:write access to github/docs-internal.
# Alternatively, use a GitHub App token for better security
# (see: actions/create-github-app-token@v1).
token: ${{ secrets.DOCS_INTERNAL_PAT }}
repository: github/docs-internal
event-type: sync-sdk-docs
client-payload: >-
{
"ref": "${{ github.sha }}",
"sender": "${{ github.actor }}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants