1
0
mirror of synced 2025-12-26 14:02:45 -05:00
Files
docs/.github/workflows/article-api-docs.yml
dependabot[bot] 301af000d8 Bump actions/checkout from 3 to 4 (#56138)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-18 00:51:02 +00:00

46 lines
1.4 KiB
YAML

name: 'Check article-api docs'
# **What it does**: Makes sure changes to the article api are documented.
# **Why we have it**: So what's documented doesn't fall behind
# **Who does it impact**: Docs engineering, CGS team
on:
workflow_dispatch:
pull_request:
paths:
- 'src/article-api/middleware/article.ts'
- 'src/article-api/middleware/pagelist.ts'
# Self-test
- .github/workflows/article-api-docs.yml
permissions:
contents: read
jobs:
check-content-linter-rules-docs:
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/node-npm-setup
- name: Check that src/article-api/README.md is up-to-date
run: npm run generate-article-api-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 "src/article-api/README.md is out of date."
echo "Please run 'npm run generate-article-api-docs' and commit the changes."
exit 1;
fi