mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-22 21:14:59 +07:00
bb3a07cd15
Co-authored-by: Markson Hon <markson@2333ma.seed>
42 lines
1015 B
YAML
42 lines
1015 B
YAML
name: Check Documents
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
pull_request:
|
|
branches: [main]
|
|
types: [ opened, synchronize, reopened ]
|
|
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@v4
|
|
- 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
|