-
Notifications
You must be signed in to change notification settings - Fork 127
86 lines (68 loc) · 1.72 KB
/
build.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
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: mdbook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install mdbook-dtmo
run: |
scripts/crate.sh --repo badboy/mdbook-dtmo --to ~/.cargo/bin
mdbook-dtmo --version
- name: Build book
run: |
mdbook-dtmo build .
get-changed-md-files:
name: get-changed-md-files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v34
with:
files: |
README.md
src/**/*.md
outputs:
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
spell-check:
needs: get-changed-md-files
name: spell-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Spell check
run: |
npm install
scripts/spell_check.sh ${{ needs.get-changed-md-files.outputs.changed_files }}
link-check:
needs: get-changed-md-files
name: link-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Link check
run: |
npm install
scripts/link_check.sh ${{ needs.get-changed-md-files.outputs.changed_files }}
prettier-check:
needs: get-changed-md-files
name: prettier-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Prettier check
run: |
npm install
scripts/prettier_fix.sh ${{ needs.get-changed-md-files.outputs.changed_files }}
git --no-pager diff --color --exit-code src/ README.md