File tree Expand file tree Collapse file tree 1 file changed +11
-19
lines changed
Expand file tree Collapse file tree 1 file changed +11
-19
lines changed Original file line number Diff line number Diff line change 1- name : Node.js CI
1+ name : HTML/JavaScript CI
22
33on :
44 push :
5- branches : [ main, master ]
5+ branches : [ main, master, gh-pages ]
66 pull_request :
7- branches : [ main, master ]
7+ branches : [ main, master, gh-pages ]
88
99jobs :
10- test :
10+ validate :
1111 runs-on : ubuntu-latest
12- strategy :
13- matrix :
14- node-version : [16.x, 18.x, 20.x]
1512
1613 steps :
1714 - uses : actions/checkout@v3
1815
19- - name : Use Node.js ${{ matrix.node-version }}
20- uses : actions/setup-node@v3
16+ - name : Validate HTML
17+ uses : Cyb3r-Jak3/html5validator-action@v7.2.0
2118 with :
22- node-version : ${{ matrix.node-version }}
23-
24- - name : Install dependencies
25- run : |
26- if [ -f package.json ]; then npm ci || npm install; fi
19+ root : .
2720 continue-on-error : true
2821
29- - name : Run tests
22+ - name : Check JavaScript syntax
3023 run : |
31- if [ -f package.json ]; then npm test || true; fi
24+ find . -name "*.js" -not -path "*/node_modules/*" -exec node --check {} \;
3225 continue-on-error : true
3326
34- - name : Build
27+ - name : Verify files exist
3528 run : |
36- if [ -f package.json ]; then npm run build --if-present || true; fi
37- continue-on-error : true
29+ test -f index.html && echo "OK: index.html exists" || echo "WARN: no index.html"
You can’t perform that action at this time.
0 commit comments