chore: add ci web

This commit is contained in:
2026-05-01 21:05:56 +02:00
parent 18d1121017
commit c32cdd0586
+70
View File
@@ -0,0 +1,70 @@
name: Frontend Web - Build & Lint
on:
push:
branches: [main]
paths:
- "frontend-prep/**"
pull_request:
branches: [main]
paths:
- "frontend-prep/**"
jobs:
lint-typecheck:
name: Lint & Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend-prep/package-lock.json
- name: Install dependencies
working-directory: frontend-prep
run: npm ci
- name: Typecheck
working-directory: frontend-prep
run: npx tsc -b --noEmit
- name: Lint
working-directory: frontend-prep
run: npm run lint
build:
name: Build
needs: lint-typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend-prep/package-lock.json
- name: Install dependencies
working-directory: frontend-prep
run: npm ci
- name: Build
working-directory: frontend-prep
env:
VITE_TOMTOM_API_KEY: ${{ secrets.VITE_TOMTOM_API_KEY }}
run: npm run build
- name: Upload dist artifact
uses: actions/upload-artifact@v4
with:
name: frontend-web-dist
path: frontend-prep/dist
retention-days: 7