apisix/.github/workflows/doc-lint.yml
dependabot[bot] 4feab8e6bf
build(deps): bump actions/checkout from 2.4.0 to 3 (#6483)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 18:10:01 +08:00

37 lines
1.0 KiB
YAML

name: Doc Lint
on:
pull_request:
branches: [master, 'release/**']
paths:
- 'docs/**'
- '**/*.md'
jobs:
markdownlint:
name: 🍇 Markdown
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- uses: actions/checkout@v3
- name: 🚀 Use Node.js
uses: actions/setup-node@v3.0.0
with:
node-version: '12.x'
- run: npm install -g markdownlint-cli@0.25.0
- run: markdownlint '**/*.md'
- name: check category
run: |
./utils/check-category.py
- name: check Chinese doc
run: |
sudo pip3 install zhon
./utils/fix-zh-doc-segment.py > \
/tmp/check.log 2>&1 || (cat /tmp/check.log && exit 1)
if grep "find broken newline in file: " /tmp/check.log; then
cat /tmp/check.log
echo "Newline can't appear in the middle of Chinese sentences."
echo "You need to run ./utils/fix-zh-doc-segment.py to fix them."
exit 1
fi