ci(site): add format/lint/test/build workflow for astro site

Add Site GitHub Actions workflow running prettier format check, astro
check, tests, and build on changes under site/. Wire prettier into the
site package with config, ignore, and scripts, and format existing
sources.
This commit is contained in:
Christian Visintin
2026-06-07 23:10:24 +02:00
parent f92cb93755
commit a2d766d688
19 changed files with 445 additions and 107 deletions

43
.github/workflows/site.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Site
on:
pull_request:
paths:
- "site/**"
- ".github/workflows/site.yml"
push:
branches: [ main ]
paths:
- "site/**"
- ".github/workflows/site.yml"
permissions:
contents: read
defaults:
run:
working-directory: site
jobs:
build-site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 24
cache: npm
cache-dependency-path: site/package-lock.json
- name: Install dependencies
run: npm ci
- name: Format
run: npm run format:check
- name: Lint
run: npm run check
- name: Test
run: npm test --if-present
- name: Build
run: npm run build