-
Notifications
You must be signed in to change notification settings - Fork 38
65 lines (55 loc) · 2.15 KB
/
check-documentation.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
name: ocelot.social check documentation
on: push
jobs:
files-changed:
name: Detect File Changes - Markdown files
runs-on: ubuntu-latest
outputs:
markdown: ${{ steps.changes.outputs.markdown }}
documentation: ${{ steps.changes.outputs.documentation }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7
- name: Check for markdown file changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell
check-markdown-links:
name: Check Markdown links
needs: files-changed
runs-on: ubuntu-latest
if: needs.files-changed.outputs.markdown == 'true'
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7
- name: Remove old documentation files
run: rm -rf ./deployment/src/old/ ./CHANGELOG.md # workaround until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/183 has been done
- name: Check Markdown Links
uses: gaurav-nelson/github-action-markdown-link-check@7d83e59a57f3c201c76eed3d33dff64ec4452d27 # 1.0.15
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'no'
# at any .md file change take the chance to check the links in all .md files
check-modified-files-only: 'no'
config-file: '.github/workflows/mlc_config.json'
base-branch: 'master'
folder-path: '.'
test-vuepress-build:
name: Test Vuepress build
needs: files-changed
runs-on: ubuntu-latest
if: needs.files-changed.outputs.documentation == 'true'
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7
- name: Setup Node 20
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.0.3
with:
node-version: '20'
- name: npm-install
run: npm install
- name: npm-docs:build
run: npm run docs:build