dae/.github/workflows/check-docs.yml
Kevin Yu 9e20a7fff6
ci(hack): add config-doc-generator (#101)
Co-authored-by: mzz2017 <2017@duck.com>
2023-05-27 19:52:13 +08:00

48 lines
1.1 KiB
YAML

name: Check document
on:
push:
branches: [main]
paths:
- 'README.md'
- 'docs/**'
- 'package.json'
- '.autocorrectrc'
- '.markdownlint-cli2.jsonc'
- '.github/workflows/check-docs.yml'
pull_request:
branches: [main]
paths:
- 'README.md'
- 'docs/**'
- 'package.json'
- '.autocorrectrc'
- '.markdownlint-cli2.jsonc'
- '.github/workflows/check-docs.yml'
jobs:
check-doc:
name: Check document
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'npm'
- name: Install dependencies
run: |
npm ci
- name: Lint Markdown files (markdownlint)
run: |
npm run markdown-lint
- name: Lint Markdown files (autocorrect)
uses: huacnlee/autocorrect-action@main
with:
args: --lint ./docs/
- name: Check broken link (including broken anchor)
run: |
npm run check-broken-link