File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed
Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 4545 - name : Install Node.js dependencies
4646 run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
4747
48- - name : Install validation tooling
49- run : " pip install check-jsonschema"
50-
5148 - name : Build with Hugo
5249 env :
5350 # For maximum backward compatibility with Hugo modules
5653 run : |
5754 hugo --minify
5855
56+ - name : Install validation tooling
57+ run : " pip install check-jsonschema"
58+
59+ - name : Validation tooling cache
60+ uses : actions/cache@v4
61+ with :
62+ path : ~/.cache/check_jsonschema/
63+ key : validation_tooling
64+
5965 - name : Validate page build
6066 run : |
6167 bash validate.sh
Original file line number Diff line number Diff line change @@ -8,15 +8,25 @@ BASE="public"
88pushd $BASE
99
1010 # Validate json files
11+ echo " Validating json files"
1112 for json in $( find . -iname " *.json" -type f) ; do
12- echo " Validating $json ..."
13+ echo " $json ..."
1314 jq . " $json " 1> /dev/null
1415 done
1516
1617 if command -v check-jsonschema > /dev/null 2>&1 ; then
1718 echo
18- echo " Validating human.json against JSON schema..."
19+
20+ echo " Validating json files against known JSON schemata..."
21+
22+ echo " ./human.json..."
1923 check-jsonschema --schemafile https://codeberg.org/robida/human.json/raw/branch/main/schema/0.1.1.json human.json
24+
25+ # jsonfeed
26+ for feed in $( find . -iname " feed.json" -type f) ; do
27+ echo " $feed ..."
28+ check-jsonschema --schemafile https://raw.githubusercontent.com/sonicdoe/jsonfeed-schema/refs/heads/master/schema-v1.1.json " $feed "
29+ done
2030 fi
2131
2232popd
You can’t perform that action at this time.
0 commit comments