on:
  pull_request:
    paths:
    - 'docs/src/public/**'
    - 'docs/build.gradle'
    - 'gradle/**'

jobs:
  check-doc-build:
    name: netCDF-Java Documentation Build Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Setup Zulu JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
          architecture: x64
      - name: Cache Gradle packages
        uses: actions/cache@v1
        with:
          path: ~/.gradle/caches
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
          restore-keys: ${{ runner.os }}-gradle
      - name: Build docs using Gradle
        run: ./gradlew buildUserGuide

Add github action to check that userguide build.
Add github action to check that userguide build.

Only runs if one or more documentation source files changed, or if there
were gradle config changes.
