feat(ci): add Vale style check workflow#6816
Merged
jstirnaman merged 13 commits intomasterfrom Mar 28, 2026
Merged
Conversation
Contributor
Vale Style Check Results
Warnings (16)
✅ Check passed |
Contributor
|
Contributor
PR Preview
Pages included in this preview
Preview auto-deploys on push. Will be cleaned up when PR closes. |
Design for adding Vale style linting to GitHub Actions PR checks: - Block merging on style errors - Inline annotations + PR summary comments - Smart config detection per product area - Shared content resolution script (reusable by other workflows) - Docker-based Vale execution (matches local setup)
Detailed step-by-step plan for implementing Vale CI: - Task 1: Shared content resolution script - Task 2: Vale check script with config mapping - Task 3: GitHub Actions workflow - Task 4: Testing procedure - Task 5: Documentation updates - Task 6: Final verification
Resolves content/shared/* files to their consuming product pages by searching for matching source: frontmatter. Reusable by Vale, link-checker, and other workflows that need shared content expansion.
Maps files to product-specific Vale configs matching lefthook.yml: - cloud-dedicated, cloud-serverless, v2 use product configs - Other content uses root .vale.ini - Non-content uses .vale-instructions.ini Runs Vale via Docker for version consistency with local dev.
Runs Vale on PR changes with product-specific configs: - Blocks merging on errors - Shows warnings/suggestions as annotations - Posts summary comment for humans and AI agents - Uses Docker for Vale version consistency
Add `|| [[ -n "$f" ]]` to while read loops to catch the last line even when input doesn't end with a newline. This is a common bash pitfall where `while read` skips the final line without a terminator.
1148bfd to
bd593d5
Compare
sanderson
approved these changes
Mar 6, 2026
Migrated design to PR description
Migrated implementation summary to PR description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Vale style linting to GitHub Actions that blocks PRs on errors and provides actionable feedback.
Changes:
.github/scripts/resolve-shared-content.sh- Resolves shared content files to their consuming product pages.github/scripts/vale-check.sh- Maps files to product-specific Vale configs and runs Vale via Docker.github/workflows/pr-vale-check.yml- CI workflow with annotations and PR commentsTest plan
Vale CI Integration Design
Overview
Add Vale style linting to GitHub Actions CI to enforce documentation quality standards on pull requests. The workflow blocks merging on style errors and provides actionable feedback through inline annotations and PR summary comments.
Goals
Design Decisions
jdkato/vale:latest)Files to Create
Workflow Architecture
Trigger Paths
Shared Content Resolution
Files in
content/shared/are sourced by product-specific pages. When a shared file changes, Vale must lint the consuming pages (which have product-specific configs).Script:
.github/scripts/resolve-shared-content.shLogic:
content/shared/*: find all pages withsource:frontmatter pointing to itExample:
Reusability: This script can be used by other workflows (link-checker, tests) that also need shared content resolution.
Vale Config Mapping
Script:
.github/scripts/vale-check.shMaps files to their Vale config based on path:
content/influxdb3/cloud-dedicated/**content/influxdb3/cloud-dedicated/.vale.inicontent/influxdb3/cloud-serverless/**content/influxdb3/cloud-serverless/.vale.inicontent/influxdb/v2/**content/influxdb/v2/.vale.inicontent/**/*.md(other).vale.ini.vale-instructions.iniFiles are grouped by config, then Vale runs once per group to minimize Docker invocations.
Vale Execution
Uses Docker to match local development:
Output Processing
GitHub Annotations
PR Summary Comment
Posted via
github-scriptaction:Exit Behavior
Implementation Tasks
.github/scripts/resolve-shared-content.sh.github/scripts/vale-check.sh.github/workflows/pr-vale-check.ymlpr-link-check.ymlto use shared resolution scriptFuture Considerations
workflow_callif other repos need the same check@vvago/valecan be removed from devDependenciesVale CI Implementation Plan
Goal: Add Vale style linting to GitHub Actions that blocks PRs on errors and provides actionable feedback.
Architecture: Single workflow with two supporting scripts. The shared content resolution script expands
content/shared/files to their consuming product pages. The vale-check script maps files to product-specific Vale configs and runs Vale via Docker.Tech Stack: Bash scripts, GitHub Actions YAML, Docker (jdkato/vale), jq for JSON processing
Implementation
Summary
After completing all tasks, you will have:
.github/scripts/resolve-shared-content.sh- Reusable script for expanding shared content.github/scripts/vale-check.sh- Vale runner with config mapping.github/workflows/pr-vale-check.yml- CI workflow with annotations and PR commentsDOCS-TESTING.mdwith CI documentationThe workflow mirrors local Lefthook behavior, using Docker-based Vale and product-specific configs.