name: Build Gradle

on:
  push:
    branches:
      - '!gh_pages'

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build with Gradle
      run: ./gradlew check --stacktrace
    - name: Deploy snapshot
      run: gradle/deploy_snapshot.sh
      if: github.ref == 'main'

name: Build Gradle

on:
  push:
    branches:
      - '*'
      - '!gh_pages'
  pull_request:
    branches:
      - '*'
      - '!gh_pages'

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build with Gradle
      run: ./gradlew check --stacktrace
    - name: Deploy snapshot
      run: gradle/deploy_snapshot.sh
      if: github.ref == 'main'

Change the triggers for the workflow
Change the triggers for the workflow
