ci(deps): bump actions/setup-node from 4 to 6 #58
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
name: Validation Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
validate: | |
name: Validate Categories | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v6 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
# Skip the markdown linting for now | |
# - name: Validate markdown files | |
# run: npm run lint:md | |
- name: Generate TOC | |
run: npm run generate:toc | |
continue-on-error: true | |
- name: Check for changes in TOC | |
id: git-check | |
run: | | |
git diff --exit-code docs/categories-directory.md || echo "toc_changed=true" >> $GITHUB_OUTPUT | |
continue-on-error: true | |
- name: Commit TOC changes on main branch | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.git-check.outputs.toc_changed == 'true' | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add docs/categories-directory.md | |
git commit -m "docs: update categories directory TOC [skip ci]" | |
git push | |
continue-on-error: true | |
- name: Test Summary | |
run: | | |
echo "### Validation Test Results :white_check_mark:" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "- **Category validation completed**" >> $GITHUB_STEP_SUMMARY |