Skip to content

feat(docs): add Vale style checking and docs workflow improvements #1

feat(docs): add Vale style checking and docs workflow improvements

feat(docs): add Vale style checking and docs workflow improvements #1

Workflow file for this run

name: Docs Unified Checks
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'docs/**'
- '**.md'
- '.github/docs/**'
- '.github/workflows/docs-unified.yaml'
permissions:
contents: read
jobs:
docs-check:
name: Documentation Validation
runs-on: ubuntu-latest
permissions:
pull-requests: write # needed for commenting on PRs
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Get PR info
id: pr_info
run: |
set -euo pipefail
PR_NUMBER=${{ github.event.pull_request.number }}
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Process Documentation
id: docs-shared
uses: ./.github/docs/actions/docs-shared
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
docs-dir: docs
include-md-files: "true"
check-links: "true"
lint-markdown: "true"
format-markdown: "true"
lint-vale: "true"
generate-preview: "true"
post-comment: "true"
pr-number: "${{ env.PR_NUMBER }}"
fail-on-error: "false" # Set to false to show all issues in one run
- name: Debug Outputs
run: |
echo "Has changes: ${{ steps.docs-shared.outputs.has_changes }}"
echo "Preview URL: ${{ steps.docs-shared.outputs.preview_url }}"
echo "Manifest changed: ${{ steps.docs-shared.outputs.manifest_changed }}"
echo "New docs found: ${{ steps.docs-shared.outputs.has_new_docs }}"
# Only display errors if there are any
if [ "${{ steps.docs-shared.outputs.lint_results }}" != "" ]; then
echo "Linting issues found"
fi
if [ "${{ steps.docs-shared.outputs.format_results }}" != "" ]; then
echo "Formatting issues found"
fi
if [ "${{ steps.docs-shared.outputs.vale_results }}" != "" ]; then
echo "Vale style issues found"
fi