-
Notifications
You must be signed in to change notification settings - Fork 25
100 lines (86 loc) · 2.99 KB
/
checks.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: check
# restricting branches prevents jobs from being run twice since
# a push to a pull request triggers two events.
on:
workflow_dispatch:
pull_request_target:
branches:
- "*"
push:
branches:
- main
jobs:
build: # --------------------------------------------------------------------
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
with:
python-version: 3.x
cache: pip
- name: set Material for MkDocs version
run: echo "MKM_VER=$(cat .mkdocs-material.version)" >> $GITHUB_ENV
- name: install Material for MkDocs and dependencies
run: |
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git@${MKM_VER}
pip install -r requirements.txt
- name: build site
run: mkdocs build --strict
yamllint: # ----------------------------------------------------------------
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: list changed yaml files
id: changedfiles
uses: tj-actions/changed-files@v38
with:
files: |
**.yml
**.yaml
- name: lint yaml files
uses: ibiqlik/action-yamllint@v3
if: steps.changedfiles.outputs.any_changed == 'true'
with:
file_or_dir: ${{ steps.changedfiles.outputs.all_changed_files }}
config_file: .github/workflows/config/yamllint.yml
mdlint: # ----------------------------------------------------------------
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: list changed markdown files
id: changedfiles
uses: tj-actions/changed-files@v38
with:
files: '**.md'
- name: lint markdown files
uses: nosborn/[email protected]
if: steps.changedfiles.outputs.any_changed == 'true'
with:
files: ${{ steps.changedfiles.outputs.all_changed_files }}
config_file: .github/workflows/config/markdownlint.yml
spellcheck: # ----------------------------------------------------------------
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: list changed markdown files
id: changedfiles
uses: tj-actions/changed-files@v38
with:
files: '**.md'
- uses: rojopolis/[email protected]
if: steps.changedfiles.outputs.any_changed == 'true'
with:
source_files: ${{ steps.changedfiles.outputs.all_changed_files }}
config_path: .github/workflows/config/spellcheck.yml
task_name: markdown
# linkcheck: # -------------------------------------------------------------
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4