Skip to content

Refactor API calls to use apiFetch utility; update environment variab… #27

Refactor API calls to use apiFetch utility; update environment variab…

Refactor API calls to use apiFetch utility; update environment variab… #27

Workflow file for this run

name: Frontend CI
on:
push:
paths:
- "client/**"
- ".github/workflows/ci-frontend.yml"
pull_request:
paths:
- "client/**"
- ".github/workflows/ci-frontend.yml"
defaults:
run:
working-directory: client
jobs:
lint:
name: Lint & Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: npm
cache-dependency-path: client/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run format:check
build:
name: Build — Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
node-version: ["20.x", "22.x"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: client/package-lock.json
- run: npm ci
- run: npm run build
- name: Upload dist
if: matrix.node-version == '20.x'
uses: actions/upload-artifact@v4
with:
name: frontend-dist
path: client/dist/
retention-days: 7