-
-
Notifications
You must be signed in to change notification settings - Fork 90
81 lines (76 loc) · 1.8 KB
/
docs-lint.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
name: Lint Docs
on:
push:
branches:
- master
paths:
- "*.md"
- "**/*.md"
- "gemfiles/rubocop.gemfile"
- "rubocop-md.yml"
- "rubocop.yml"
- ".mdlrc"
- "forspell.dict"
pull_request:
paths:
- "*.md"
- "**/*.md"
- "gemfiles/rubocop.gemfile"
- "rubocop-md.yml"
- "rubocop.yml"
- ".mdlrc"
- "forspell.dict"
jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Run Markdown linter
run: |
gem install mdl
mdl **/*.md
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Lint Markdown files with RuboCop
run: |
gem install bundler
bundle install --gemfile gemfiles/rubocop.gemfile --jobs 4 --retry 3
bundle exec --gemfile gemfiles/rubocop.gemfile rubocop -c .rubocop-md.yml
forspell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Hunspell
run: |
sudo apt-get install hunspell
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Cache installed gems
uses: actions/cache@v1
with:
path: /home/runner/.rubies/ruby-2.7.0/lib/ruby/gems/2.7.0
key: gems-cache-${{ runner.os }}
- name: Install Forspell
run: gem install forspell
- name: Run Forspell
run: forspell **/*.md *.md
lychee:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Link Checker
id: lychee
uses: lycheeverse/[email protected]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: docs README.md CHANGELOG.md -v