name: check frontend build
on:
  workflow_run:
    workflows: ["Change versions"]
    types:
      - completed

  merge_group:
  push:
    paths:
      - "frontend/**"
      - ".github/workflows/frontend-check.yml"

jobs:
  npm_check:
    runs-on: ubicloud-standard-8
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v5
        with:
          node-version: 24
          cache: "npm"
          cache-dependency-path: "frontend/package-lock.json"
      - name: "npm check"
        timeout-minutes: 5
        run: cd frontend && npm ci && npm run generate-backend-client && npm run
          check
