ci(docs): add mdx linter and enable checks for PRs (#10013)

This commit is contained in:
André Costa
2026-04-24 12:48:39 +02:00
committed by GitHub
parent fc1136e8d9
commit 26111246f1
2 changed files with 30 additions and 10 deletions
+24 -4
View File
@@ -1,6 +1,20 @@
name: Build Docs
name: Build Docs
on:
workflow_dispatch: # allow manual triggering
pull_request:
paths:
- 'docs/**'
- 'src/**'
- 'examples/**'
- 'demos/**'
- 'configs/ci/docs/**'
- 'scripts/build_html_examples.sh'
- 'scripts/find_version.sh'
- 'lv_conf_template.h'
- 'lv_version.h'
- 'lvgl.h'
- '.github/workflows/compile_docs.yml'
push:
branches:
- master
@@ -75,13 +89,11 @@ jobs:
# Tool used to convert Doxygen XML to .mdx API pages
- name: Install doxymark
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
run: |
npm install github:mutahharmkhan/doxymark
# Generate Documentation API pages
- name: Generate API pages
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
run: |
npx doxymark \
--input docs/doxygen/xml \
@@ -101,12 +113,20 @@ jobs:
npx -p @lvgl/examples-generator lvgl-examples-check-examples --src examples
- name: Generate Example Documentation
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
run: |
npx -p @lvgl/examples-generator lvgl-examples-gen \
--src examples \
--out docs/src/examples
- name: Install mdx linter
run: npm i @lvgl/mdx-lint
- name: Run mdx linter
run: |
npx @lvgl/mdx-lint "docs/**/*.{md,mdx}" \
--fail-on-warning \
--reporter github
- name: Retrieve version
id: version
run: |