-
Notifications
You must be signed in to change notification settings - Fork 103
56 lines (47 loc) · 1.75 KB
/
Copy pathpre-commit.yml
File metadata and controls
56 lines (47 loc) · 1.75 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Documentation Quality Checks
on:
push:
branches: [master, main]
paths: ["**.md", "**.yaml", "**.yml", "**.json", ".pre-commit-config.yaml"]
pull_request:
branches: [master, main]
paths: ["**.md", "**.yaml", "**.yml", "**.json", ".pre-commit-config.yaml"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
documentation-quality:
runs-on: ubuntu-latest
name: Quality Checks (Markdown, Typos, Formatting)
steps:
- name: 📥 Checkout repository
uses: actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0 # v6.0.3
with:
fetch-depth: 0
- name: 🐍 Setup Python 3.11
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
cache: "pip"
- name: 📦 Setup Node.js 20
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "20"
- name: 🔧 Cache pre-commit environments
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/pre-commit
~/.cache/pip
key: pre-commit-${{ runner.os }}-python-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
pre-commit-${{ runner.os }}-python-
pre-commit-${{ runner.os }}-
- name: 📋 Install pre-commit dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: 🔍 Run documentation quality checks
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: --all-files --show-diff-on-failure