Skip to content

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

Merged
sunker merged 6 commits into
mainfrom
eriksundell/plugin-docs-build-step
Aug 20, 2026
Merged

feat: build plugin docs as part of package-plugin when docsPath is set#219
sunker merged 6 commits into
mainfrom
eriksundell/plugin-docs-build-step

Conversation

@sunker

@sunker sunker commented May 4, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds a "Build plugin documentation" step to package-plugin that runs npx @grafana/plugin-docs-cli build when docsPath is set in dist/plugin.json. The step generates dist/docs/manifest.json and copies the markdown and images, so multi-page docs ride along in the resulting ZIP and reach the CDN through the existing pipeline.

Plugins without docsPath are unaffected - the bash conditional short-circuits before invoking the CLI.

Which issue(s) this PR fixes:

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

Special notes for your reviewer:

@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
@sunker
sunker marked this pull request as ready for review August 19, 2026 13:47
@sunker
sunker requested a review from a team as a code owner August 19, 2026 13:47
@sunker
sunker requested review from academo, leventebalogh and toddtreece and a lite review from Copilot and removed request for a team August 19, 2026 13:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an optional documentation build step to the package-plugin composite action so that plugins declaring docsPath can ship multi-page docs artifacts inside the packaged ZIP (and onward to the CDN pipeline).

Changes:

  • Adds a “Build plugin documentation” step that runs npx @grafana/plugin-docs-cli build when docsPath is set in dist/plugin.json.

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

Comment thread package-plugin/action.yml
Comment thread package-plugin/action.yml
- name: Build plugin documentation
shell: bash
run: |
sudo apt-get install jq

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am not 100% sure we can just assume the runner for this action is going to be debian-based. You can move this into a two steps where a nodejs script reads the json and exports the docs_path and the other uses it.

Unless I am mistaken and we are already running apt commands in other parts of this build action

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We already use debian-based commands in this action - see for exampel

sudo apt-get install jq

@sunker
sunker merged commit f81a167 into main Aug 20, 2026
16 checks passed
@sunker
sunker deleted the eriksundell/plugin-docs-build-step branch August 20, 2026 07:56
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

3 participants