on:
  pull_request:
    branches:
      - main
    paths:
      - "frontend/**"

name: Frontend Code Checking

permissions:
  pull-requests: write

jobs:
  generic_handler:
    name: Frontend Code Checking
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          token: ${{ secrets.GH_TOKEN }}
      - name: Set up JDK 21
        uses: actions/setup-java@v3
        with:
          distribution: 'zulu'
          java-version: 21
          cache: 'maven'
          cache-dependency-path: '**/pom.xml' # optional
          check-latest: true
      - name: Build with Maven - only frontend
        run: mvn -T 1C -B package --file pom.xml -pl frontend
