Skip to content

Reusable Workflow: trigger-docs-rebuild

Dispatches a repository_dispatch event to Trickle-Charge/TrickleCharge-Docs to trigger a central documentation site rebuild across caller repositories

Workflow Path: Trickle-Charge/TrickleCharge-Infra/.github/workflows/trigger-docs-rebuild.yml@main

Secrets

Secret Description Required
DOCS_DISPATCH_TOKEN Personal Access Token (PAT) with write access to dispatch events in TrickleCharge-Docs repo Yes

Workflow Pipeline Steps

When called by a downstream repository, this workflow executes a single step:

  1. Dispatch Rebuild Event: Sends a POST request to the GitHub API for Trickle-Charge/TrickleCharge-Docs/dispatches with an event type of rebuild-docs using DOCS_DISPATCH_TOKEN.

Example Usage

Call from an exiting workflow.

Or create a workflow file (e.g., .github/workflows/docs-dispatch.yml) in any consumer repository:

name: Docs Sync

on:
  push:
    branches:
      - main
    paths:
      - 'docs/**'
      - 'README.md'

jobs:
  notify-docs:
    uses: Trickle-Charge/TrickleCharge-Infra/.github/workflows/trigger-docs-rebuild.yml@main
    secrets:
      DOCS_DISPATCH_TOKEN: ${{ secrets.DOCS_DISPATCH_TOKEN }}