-
Notifications
You must be signed in to change notification settings - Fork 16
35 lines (34 loc) · 1.01 KB
/
pangu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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