71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
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
|