1
0
mirror of synced 2025-12-19 09:57:42 -05:00
Files
docs/.github/workflows/content-linter-rules-docs.yml
dependabot[bot] 3e333183fb Bump actions/checkout from 5.0.0 to 6.0.1 (#58937)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 23:37:47 +00:00

49 lines
1.5 KiB
YAML

name: 'Check content-linter rules docs'
# **What it does**: Makes sure the content-linter-rules.md is up-to-date.
# **Why we have it**: So what's automated doesn't fall behind
# **Who does it impact**: Docs content.
on:
workflow_dispatch:
pull_request:
paths:
- 'src/content-linter/**'
# In case imported markdownlint rules are updated
- package-lock.json
# In case manual changes are made to the content-linter-rules.md file
- data/reusables/contributing/content-linter-rules.md
# Self-test
- .github/workflows/content-linter-rules-docs.yml
permissions:
contents: read
jobs:
check-content-linter-rules-docs:
runs-on: ubuntu-latest
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/node-npm-setup
- name: Check that content-linter-rules.md is up-to-date
run: npm run generate-content-linter-docs
- name: Fail if it isn't up-to-date
run: |
if [ -n "$(git status --porcelain)" ]; then
git status
git diff
# Some whitespace for the sake of the message below
echo ""
echo ""
echo "content-linter-rules.md is out of date."
echo "Please run 'npm run generate-content-linter-docs' and commit the changes."
exit 1;
fi