Skip to content

feat: add pangu linter #14

feat: add pangu linter

feat: add pangu linter #14

Workflow file for this run

name: Check Markdown format
on:
pull_request:
types: [ synchronize, opened, reopened ]
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
list-files: shell
filters: |
markdown:
- added|modified: '**/*.md'
- name: Install packages
if: ${{ steps.changes.outputs.markdown == 'true' }}
run: |
pip install -U pangu
- name: Test tool
env:
PYTHONUNBUFFERED: 1
run: python -u -m pangu -f _docs/zh/administration/backup-request.md
- name: Test cat
run: cat _docs/zh/administration/backup-request.md
- name: Check format
env:
PYTHONUNBUFFERED: 1
if: ${{ steps.changes.outputs.markdown == 'true' }}
run: for markdown_file in ${{ steps.changes.outputs.markdown_files }}; do python -u -m pangu -f ${markdown_file}; done