name: Validate Javadocs Generation

on:
  workflow_dispatch:
  push:
    branches:
      - master
      - release-*
    tags:
      - v*

  pull_request:
    branches:
    - master
    - release-*

jobs:
  build:
    name: "Validate Javadocs generation"
    runs-on: linux-arm64-latest-4-cores
    timeout-minutes: 30
    env:
      JDK_VER: 17
    steps:
    - uses: actions/checkout@v4
    - name: Set up OpenJDK ${{ env.JDK_VER }}
      uses: actions/setup-java@v4
      with:
        distribution: 'temurin'
        java-version: ${{ env.JDK_VER }}
    - name: Install jars
      run: ./mvnw install -q -B -DskipTests
    - name: Validate Java docs generation
      run: ./mvnw site-deploy
