Skip to content

Trigger HELPERBOT brain update after Pages deploy#595

Merged
seanmakesgames merged 2 commits into
mainfrom
sean-trigger-helperbot-update
May 5, 2026
Merged

Trigger HELPERBOT brain update after Pages deploy#595
seanmakesgames merged 2 commits into
mainfrom
sean-trigger-helperbot-update

Conversation

@seanmakesgames
Copy link
Copy Markdown
Member

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:

  • Smoke test by triggering the deploy workflow manually:
    ```
    gh workflow run "Deploy Docusaurus site to GitHub Pages" --repo comcode-org/hackmud_wiki
    ```
  • Watch this repo's run complete the new `notify` job, then check that a fresh run appears on the discord side with `event: repository_dispatch`:
    ```
    gh run list --repo comcode-org/discord --workflow "Update HELPERBOT brain" --limit 1
    ```

🤖 Generated with Claude Code

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>
@seanmakesgames seanmakesgames requested a review from a team as a code owner May 5, 2026 04:54
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@seanmakesgames seanmakesgames merged commit ee5a555 into main May 5, 2026
4 checks passed
@seanmakesgames seanmakesgames deleted the sean-trigger-helperbot-update branch May 5, 2026 04:58
@seanmakesgames
Copy link
Copy Markdown
Member Author

new action usage reviewed and approved.

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.

1 participant