Skip to content

Commit d843b5f

Browse files
committed
Tweak npm scripts
* add `--strict` in the mkdocs build like on CI * add a `start` script to run serve (can be used with `npm start`) * move `build` to `pretest` As a result, build runs once on CI now
1 parent 444c2c1 commit d843b5f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/workflows/ci.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,5 @@ jobs:
4040
- name: Install npm dependencies
4141
run: npm ci
4242

43-
- name: Build docs
44-
run: mkdocs build --strict
45-
46-
- name: Test
43+
- name: Build and test
4744
run: npm test

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
},
1717
"homepage": "https://docs.pi-hole.net/",
1818
"scripts": {
19-
"build": "mkdocs build --clean",
19+
"build": "mkdocs build --clean --strict",
2020
"markdownlint": "markdownlint-cli2 \"**/*.md\" \"!**/node_modules/**\"",
21-
"linkinator": "npm run build && linkinator site --recurse --silent --skip \"^(?!http://localhost)\"",
21+
"linkinator": "linkinator site --recurse --silent --skip \"^(?!http://localhost)\"",
22+
"pretest": "npm run build",
2223
"test": "npm run markdownlint && npm run linkinator",
23-
"serve": "mkdocs serve --dev-addr 0.0.0.0:8000"
24+
"serve": "mkdocs serve --dev-addr 0.0.0.0:8000",
25+
"start": "npm run serve"
2426
},
2527
"devDependencies": {
2628
"linkinator": "^6.1.2",

0 commit comments

Comments
 (0)