-
Notifications
You must be signed in to change notification settings - Fork 7
87 lines (83 loc) · 2.23 KB
/
ci_testing.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
name: Pull-Request-CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
Build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python Packages
run: |
pip install -r requirements.txt
- name: Build Website
run: |
mkdocs build
- uses: actions/upload-artifact@v3
with:
name: site
path: site/
Spell-and-Grammar-Check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: actions/setup-node@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python Packages
run: |
pip install -r requirements.txt
npm i gramma -g
- name: Build Website
run: |
mkdocs build
- name: codespell Check
run: |
codespell docs/
- name: Grammar Check
run: |
git remote add origin https://github.com/DOI-USGS/asc-public-docs.git
git fetch origin main
# List the files that changed
git diff --name-only origin/main
# Grammar check only those files
git diff --name-only origin/main | grep -e .md -e .MD | sed 's/^/"/;s/$/"/' | xargs -t -L1 gramma check -p || true
Link-Check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python Packages
run: |
pip install -r requirements.txt
- name: Build Website
run: |
mkdocs build
- name: spell check
run: |
linkchecker site/index.html --ignore-url '(asc-public-docs/site/docs/software/|manuals/)'