Skip to content

docs: unify documentation workflows with improved validation #17522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d0fe1f8
Add simplified docs preview GitHub action
EdwardAngert Apr 9, 2025
3010c77
Merge branch 'main' into simplified-docs-preview
EdwardAngert Apr 9, 2025
afbdde9
\Fix tj-actions/changed-files SHA to match existing usage\n\nUpdate t…
EdwardAngert Apr 9, 2025
1f716c9
\Fix docs preview workflow to ensure PR comments are posted\n\nUpdate…
EdwardAngert Apr 9, 2025
38cfd56
\Update preview URL format and add direct doc links\
EdwardAngert Apr 9, 2025
e072e92
Add shared docs GitHub action
EdwardAngert Apr 9, 2025
07e93b0
test: Add heading to docs README
EdwardAngert Apr 9, 2025
6a7a2bc
Add test workflow
EdwardAngert Apr 9, 2025
4fcb322
Unified documentation workflow
EdwardAngert Apr 23, 2025
777bddc
Enhance documentation workflows with cross-reference checking
EdwardAngert Apr 23, 2025
992c592
Enhance PR comment with informative status overview and collapsible s…
EdwardAngert Apr 23, 2025
6420b3f
Optimize workflow logic and improve Vale style checking
EdwardAngert Apr 23, 2025
0a464f3
enhance: optimize workflow with unified reporting and concurrency
EdwardAngert Apr 23, 2025
3840432
refactor: replace linkspector with lychee for link checking
EdwardAngert Apr 23, 2025
b555621
refactor: combine documentation workflow optimizations
EdwardAngert Apr 23, 2025
00a4fb0
fix: address workflow issues for GitHub Actions compatibility
EdwardAngert Apr 23, 2025
ba403f2
docs: update GitHub Actions documentation
EdwardAngert Apr 23, 2025
168b54b
Merge branch 'main' into feature/unified-docs-workflow-combined
EdwardAngert Apr 23, 2025
6a0c1c1
fix: remove duplicate docs example workflows and fix caching issues
EdwardAngert Apr 23, 2025
8a29450
fix: update lychee-action configuration for v1 compatibility
EdwardAngert Apr 23, 2025
e37cda8
fix readme
EdwardAngert Apr 23, 2025
749d142
fix: correct YAML syntax in docs-link-check.yaml
EdwardAngert Apr 23, 2025
90a9ca8
chore: use caret versioning for tj-actions/changed-files
EdwardAngert Apr 23, 2025
bb9e393
fix: update actions and preview URL handling
EdwardAngert Apr 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Optimize workflow logic and improve Vale style checking
- Move Vale installation to docs-setup action for better reusability
- Remove duplicate Vale installation step from shared action
- Add empty file check to Vale style checking for robustness
- Update workflow to conditionally install Vale based on input parameter
- Make Vale configuration more explicit with improved comments
- Ensure consistent use of pre-processed file lists
  • Loading branch information
EdwardAngert committed Apr 23, 2025
commit 6420b3f05a9bf8773f95c1990da32faa1c698581
13 changes: 12 additions & 1 deletion .github/docs/actions/docs-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ inputs:
description: 'Git fetch depth'
required: false
default: '0'
setup-vale:
description: 'Whether to setup Vale for style checking'
required: false
default: 'true'

runs:
using: 'composite'
Expand All @@ -33,4 +37,11 @@ runs:

- name: Install dependencies
shell: bash
run: ./scripts/pnpm_install.sh
run: ./scripts/pnpm_install.sh

- name: Install Vale
if: inputs.setup-vale == 'true'
uses: errata-ai/vale-action@v2
with:
config: .github/docs/vale/.vale.ini
files: "" # Don't run Vale yet, just install it
14 changes: 8 additions & 6 deletions .github/docs/actions/docs-shared/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,18 +309,20 @@ runs:
fail_on_error: ${{ inputs.fail-on-error }}
filter_mode: "nofilter"

- name: Install Vale
if: inputs.lint-vale == 'true' && steps.docs-analysis.outputs.has_changes == 'true'
uses: errata-ai/vale-action@v2
with:
config: .github/docs/vale/.vale.ini

- name: Run Vale style checks
if: inputs.lint-vale == 'true' && steps.docs-analysis.outputs.has_changes == 'true'
id: lint-vale
shell: bash
run: |
# Run Vale on changed markdown files using our pre-processed list
# First check if we have any markdown files to process
if [ -z "${{ steps.process-files.outputs.md_files_line }}" ]; then
echo "No markdown files to check"
exit 0
fi

# Run Vale on changed files and capture output
# Use xargs with -r to skip execution if no files are provided
vale_output=$(echo "${{ steps.process-files.outputs.md_files_line }}" | xargs -r vale --config=.github/docs/vale/.vale.ini --output=line 2>&1) || true

echo "result<<EOF" >> $GITHUB_OUTPUT
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs-unified.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:

- name: Setup Environment
uses: ./.github/docs/actions/docs-setup
with:
setup-vale: ${{ inputs.lint-vale }}

- name: Get PR info
id: pr_info
Expand Down