Skip to content

feat: build plugin docs as part of package-plugin when docsPath is set#219

Draft
sunker wants to merge 2 commits intomainfrom
eriksundell/plugin-docs-build-step
Draft

feat: build plugin docs as part of package-plugin when docsPath is set#219
sunker wants to merge 2 commits intomainfrom
eriksundell/plugin-docs-build-step

Conversation

@sunker
Copy link
Copy Markdown
Contributor

@sunker sunker commented May 4, 2026

What this PR does / why we need it:

Adds a "Build plugin documentation" step to package-plugin/action.yml that runs after the frontend build. When docsPath is set in the plugin's plugin.json, it invokes @grafana/plugin-docs-cli build to generate dist/docs/ — containing the docs manifest and all markdown and image files — before the ZIP is created. This means docs files are included in the release archive automatically, making them available for CDN sync and the GCOM docs API.

Plugins without docsPath are entirely unaffected: the step reads dist/plugin.json after the webpack build and exits immediately if the field is absent.

Which issue(s) this PR fixes:

No issue — part of the multi-page plugin docs initiative.

Special notes for your reviewer:

  • plugin-docs-cli requires Node >=24. Callers using multi-page docs must pass node-version: 24 to the action (most already do; the docstest plugin does).
  • The build-plugin/action.yml change (pointing package-plugin at this branch) is temporary for testing only and must be reverted to @main before merging.
  • Validation is handled by the existing plugin-validator step, which already invokes plugin-docs-cli validate --strict internally. Docs errors fail the release there.
  • Pair with Create Plugin: Add validate-docs workflow to scaffolded plugins plugin-tools#2609 for the CI validation workflow.

@sunker sunker changed the title Build plugin docs as part of package-plugin when docsPath is set feat: build plugin docs as part of package-plugin when docsPath is set May 4, 2026
@grafana-plugins-platform-bot grafana-plugins-platform-bot Bot moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔬 In review

Development

Successfully merging this pull request may close these issues.

1 participant