Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
77 changes: 77 additions & 0 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Docs PR Validation

on:
pull_request:
branches: [main]
paths:
- 'docs-cms/**'
- 'docusaurus/**'
- 'tooling/build_docs.py'
- 'tooling/validate_docs.py'
- '**/*.md'
- '.github/workflows/docs-pr.yml'

# Cancel in-progress runs for the same PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
validate-docs:
name: Validate Documentation
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: docusaurus/package-lock.json

- name: Install Node dependencies
run: cd docusaurus && npm ci

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Validate documentation
run: uv run tooling/validate_docs.py

- name: Build documentation
run: uv run tooling/build_docs.py

- name: Check for broken links in built docs
run: |
echo "Documentation validation and build completed successfully"

docs-status:
name: Docs Status Check
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [validate-docs]
if: always()

steps:
- name: Check validation status
id: docs_check
run: |

Check warning on line 69 in .github/workflows/docs-pr.yml

View workflow job for this annotation

GitHub Actions / Lint GitHub Actions

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:7:28: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/docs-pr.yml:69:9: shellcheck reported issue in this script: SC2086:info:7:28: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 69 in .github/workflows/docs-pr.yml

View workflow job for this annotation

GitHub Actions / Lint GitHub Actions

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:3:28: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/docs-pr.yml:69:9: shellcheck reported issue in this script: SC2086:info:3:28: Double quote to prevent globbing and word splitting [shellcheck]
if [[ "${{ needs.validate-docs.result }}" != "success" ]]; then
echo "❌ Documentation validation failed"
echo "status=failure" >> $GITHUB_OUTPUT
exit 1
else
echo "✅ Documentation validation passed"
echo "status=success" >> $GITHUB_OUTPUT
fi
Loading
Loading