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
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
Add test workflow
  • Loading branch information
EdwardAngert committed Apr 9, 2025
commit 6a7a2bc7e73b0964aad6699fdaaa6ba6afd05b1c
72 changes: 72 additions & 0 deletions .github/workflows/test-docs-shared.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Docs Shared Example
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'docs/**'
- '**.md'
- '.github/workflows/docs-shared-example.yaml'
- '.github/actions/docs-shared/**'

permissions:
contents: read

jobs:
docs-check:
name: Check Documentation
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/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"
generate-preview: "true"
post-comment: "true"
pr-number: "${{ env.PR_NUMBER }}"
fail-on-error: "false" # Set to false for this example to show all checks

- 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:"
echo "${{ steps.docs-shared.outputs.lint_results }}"
fi

if [ "${{ steps.docs-shared.outputs.format_results }}" != "" ]; then
echo "Formatting issues found:"
echo "${{ steps.docs-shared.outputs.format_results }}"
fi
Loading