Trigger HELPERBOT brain update after Pages deploy#595
Merged
Conversation
Adds a notify job that runs after the github-pages deploy succeeds and sends a repository_dispatch event to comcode-org/discord with type wiki-updated. The discord repo's "Update HELPERBOT brain" workflow listens for that event, rebuilds the wiki and pushes a fresh flattened brain to the HELPERBOT OpenAI assistant. Uses peter-evans/repository-dispatch pinned to v4.0.1 (28959ce8df70de7be546dd1250a005dd32156697). Authenticates with a fine-grained PAT stored as DISCORD_DISPATCH_TOKEN secret on this repo, scoped to actions:write on comcode-org/discord only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
new action usage reviewed and approved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the wiki is published via GitHub Pages, HELPERBOT's brain content stays whatever it was -- there's no mechanism to refresh the OpenAI assistant's vector store with the new content. We added an automated workflow on `comcode-org/discord` that does the rebuild + flatten + push, but it currently only runs on manual `workflow_dispatch`. We want a successful wiki publish to fire it automatically.
Context
Adds a `notify` job that runs after the `deploy` job succeeds and sends a `repository_dispatch` event to `comcode-org/discord` with event type `wiki-updated`. The discord repo's `Update HELPERBOT brain` workflow already listens for that event (landed on its main as of comcode-org/discord#87) and refreshes the assistant.
Uses `peter-evans/repository-dispatch` pinned to v4.0.1 (`28959ce8df70de7be546dd1250a005dd32156697`). The action is ~30 lines of TS, MIT-licensed, ~1.2k stars, last released 2025-11-14, depends only on `@actions/core` and `@actions/github`. It does exactly one thing: calls `octokit.rest.repos.createDispatchEvent`.
Auth uses a fine-grained PAT stored as `DISCORD_DISPATCH_TOKEN` on this repo, scoped to `actions:write` on `comcode-org/discord` only.
Test plan after merge:
```
gh workflow run "Deploy Docusaurus site to GitHub Pages" --repo comcode-org/hackmud_wiki
```
```
gh run list --repo comcode-org/discord --workflow "Update HELPERBOT brain" --limit 1
```
🤖 Generated with Claude Code