Skip to content

Merge branch 'diag/ae445-growth-fingerprint' #476

Merge branch 'diag/ae445-growth-fingerprint'

Merge branch 'diag/ae445-growth-fingerprint' #476

name: Notify docs website
# The documentation site (superuser404notfound/aetherengine-website) fetches
# README.md, docs/**, and CHANGELOG.md from this repo's main at build time.
# When any of those change, dispatch a rebuild there with the new SHA so the
# site re-fetches the docs. The site also rebuilds on a daily schedule, so a
# missed dispatch self-heals within a day.
#
# Requires a WEBSITE_DISPATCH_TOKEN secret: a fine-grained PAT with
# "Contents: read and write" on the aetherengine-website repo. The default
# GITHUB_TOKEN cannot trigger workflows in another repository.
on:
push:
branches: [main]
paths:
- README.md
- docs/**
- CHANGELOG.md
workflow_dispatch:
jobs:
dispatch:
name: Dispatch website rebuild
runs-on: ubuntu-latest
steps:
- name: Send repository_dispatch
env:
TOKEN: ${{ secrets.WEBSITE_DISPATCH_TOKEN }}
SHA: ${{ github.sha }}
run: |
set -euo pipefail
if [ -z "${TOKEN:-}" ]; then
echo "WEBSITE_DISPATCH_TOKEN is not set; skipping (the website rebuilds daily on schedule)." >> "$GITHUB_STEP_SUMMARY"
exit 0
fi
curl -fsS -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/superuser404notfound/aetherengine-website/dispatches \
-d "{\"event_type\":\"engine-docs-updated\",\"client_payload\":{\"sha\":\"${SHA}\"}}"
echo "Dispatched engine-docs-updated for ${SHA}." >> "$GITHUB_STEP_SUMMARY"