Skip to content

Commit 7cbac10

Browse files
author
LiveDelay Developer
committed
Update CI workflow for static HTML/JavaScript app
1 parent 9b09148 commit 7cbac10

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,29 @@
1-
name: Node.js CI
1+
name: HTML/JavaScript CI
22

33
on:
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

99
jobs:
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"

0 commit comments

Comments
 (0)