Skip to content

Publish Pi4J's Groma architecture map at pi4j.com/groma - #94

Open
FDelporte wants to merge 5 commits into
mainfrom
feature/publish-groma-architecture-map
Open

FDelporte wants to merge 5 commits into
mainfrom
feature/publish-groma-architecture-map

Conversation

@FDelporte

Copy link
Copy Markdown
Member

Summary

  • Adds a step to .github/workflows/hugo.yml that checks out Pi4J/pi4j (public, read-only) and runs groma export into static/groma before the Hugo build, so the map ends up published at pi4j.com/groma/ alongside the existing v1/v2 static content.
  • Adds a repository_dispatch (groma-architecture-updated) and workflow_dispatch trigger, so the site can be rebuilt on demand instead of only on pushes to this repo.
  • Companion change in Pi4J/pi4j: a workflow that sends this repository_dispatch whenever architecture-relevant paths change on its main branch — see Pi4J/pi4j#786.

Requires a one-time manual step

For the automatic rebuild-on-change to work, a maintainer needs to:

  1. Create a Personal Access Token with write access to this repo (fine-grained: Contents read + Actions write is enough; classic: repo scope).
  2. Add it as a secret named GROMA_WEBSITE_DISPATCH_TOKEN in the Pi4J/pi4j repository's settings (not this one).

Without that secret, this repo's own push-to-main trigger still works as before; the map just won't auto-refresh when only the Pi4J/pi4j code changes.

Test plan

  • Merge and confirm the Action run checks out Pi4J/pi4j, exports successfully, and the Hugo build/deploy completes
  • Visit https://www.pi4j.com/groma/ and confirm the map loads
  • After the companion secret is added, push an architecture-relevant change to Pi4J/pi4j's main and confirm this repo rebuilds via repository_dispatch

🤖 Generated with Claude Code

Checks out Pi4J/pi4j (public, read-only) during the Hugo build, exports
its already-curated groma.md architecture map into static/groma, and
lets Hugo copy it to the site root as usual. Also reacts to a
repository_dispatch sent from Pi4J/pi4j whenever architecture-relevant
paths change on its main branch, so the page stays current without
waiting for an unrelated push to this repo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Token permissions, reproducible tool versioning, and concurrent deployment handling need correction.

Review effort: Balanced
Findings: 2 High severity · 1 Medium severity

Open (3)
What changed in this PR

Publishes Pi4J’s Groma architecture map through the existing Hugo deployment workflow.

Changes:

  • Adds manual and repository-dispatch deployment triggers.
  • Exports the Pi4J Groma map into Hugo static assets.
  • Excludes generated map files from version control.
File Description
.github/​workflows/​hugo.yml Adds Groma export and deployment triggers.
.gitignore Ignores generated Groma assets.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +7 to +8
repository_dispatch:
types: [groma-architecture-updated]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fine-grained PAT instructions should say Contents: write for Pi4J/pi4j.github.io; Actions: write is not required for the repository_dispatch endpoint. The classic repo scope remains unchanged.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setup instructions are in the PR description, not a repository file. They should specify a fine-grained PAT with Contents: write for Pi4J/pi4j.github.io; Actions: write is not required for repository_dispatch. The classic PAT repo scope remains unchanged.

Comment thread .github/workflows/hugo.yml
Comment thread .github/workflows/hugo.yml Outdated
FDelporte and others added 2 commits October 7, 2026 13:17
Add concurrency settings for GitHub Pages deployment

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@eitch eitch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the serialization should be done

This branch has not been deployed

No deployments
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.

4 participants