File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,29 @@ jobs:
4141 # Installs HTMLHint and Stylelint using pnpm
4242 - name : Install dependencies
4343 run : |
44+ set -e
4445 npm install -g pnpm
4546 pnpm install htmlhint stylelint stylelint-config-standard --save-dev
4647
47- # Runs HTML validation
48+ # Runs HTML validation and logs errors
4849 - name : Validate HTML
49- run : npx htmlhint .
50+ run : |
51+ set -e
52+ npx htmlhint . 2> html_validation_errors.log || true
53+ if [ -s html_validation_errors.log ]; then
54+ echo "HTML validation errors found. Check html_validation_errors.log for details."
55+ exit 1
56+ fi
5057
51- # Runs CSS validation
58+ # Runs CSS validation and logs errors
5259 - name : Validate CSS
53- run : npx stylelint "**/*.css"
60+ run : |
61+ set -e
62+ npx stylelint "**/*.css" 2> css_validation_errors.log || true
63+ if [ -s css_validation_errors.log ]; then
64+ echo "CSS validation errors found. Check css_validation_errors.log for details."
65+ exit 1
66+ fi
67+
68+
5469
You can’t perform that action at this time.
0 commit comments