From ed82d8d72d5397aab580cc4a10ceed3b243f99b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lud=C4=9Bk=20Su=C5=A1ick=C3=BD?= Date: Tue, 24 Nov 2026 19:05:44 +0100 Subject: [PATCH] ci: check JavaScript syntax, JSON validity and local links Catch broken assets and malformed JSON before they reach main. The link check stays offline, so it verifies files inside the repository and does not fail on external bot protection. --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e9ffa80 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Syntaxe JavaScriptu + run: | + for f in $(git ls-files '*.js'); do + node --check "$f" 2>/dev/null || node --input-type=module --check < "$f" + done + - name: Platnost JSON + run: | + for f in $(git ls-files '*.json' '*.webmanifest'); do + python3 -m json.tool "$f" > /dev/null + done + - name: Lokální odkazy + uses: lycheeverse/lychee-action@v2 + with: + args: --offline --include-fragments --no-progress './**/*.html' './**/*.md' + fail: true + failIfEmpty: false