54 lines (52 loc) · 1.58 KB
/
docscheck.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
name: Check docs
defaults:
run:
shell: bash
on:
push:
branches:
- master
pull_request:
paths:
- "docs/**"
- ".spellcheckwordlist.txt"
- ".spellcheck.yml"
- ".markdownlint.jsonc"
- "mkdocs.yml"
- ".readthedocs.yaml"
- ".github/workflows/**"
- "markdown-link-check.json"
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Docs check (spellcheck, markdownlint)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rojopolis/spellcheck-github-actions@v0
name: Spellcheck
- run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
- name: Run markdownlint on docs
uses: docker://avtodev/markdown-lint:v1
with:
config: '.markdownlint.jsonc'
args: '*.md docs/content'
# - name: Debugging with tmate
# uses: mxschmitt/action-tmate@v3.1
- name: "Check links in markdown"
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
folder-path: 'docs/'
file-path: "README.md"
config-file: 'markdown-link-check.json'
- name: Test mkdocs
env:
MKDOCS_GITHUB_USER: ${{ secrets.MKDOCS_GITHUB_USER }}
MKDOCS_GITHUB_TOKEN: ${{ secrets.MKDOCS_GITHUB_TOKEN }}
if: env.MKDOCS_GITHUB_TOKEN != ''
run: |
sudo pip3 install setuptools
sudo pip3 install -r docs/mkdocs-pip-requirements
mkdocs -q build -d /tmp/mkdocsbuild