name: SageTV CI GitHub Actions

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

#    runs-on: ubuntu-latest
    runs-on: ubuntu-18.04

    steps:
    - uses: actions/checkout@v2
    - name: Set up Oracle JDK 9
      uses: actions/setup-java@v2
      with:
        java-version: '9'
        distribution: 'adopt'
        cache: gradle
    - name: Update apt
      run: sudo apt-get update -qq
    - name: Install packages from apt
      run: sudo apt-get install -y unzip build-essential git libx11-dev libxt-dev libraw1394-dev libavc1394-dev libiec61883-dev libfreetype6-dev yasm autoconf libtool libaudio-dev libpulse-dev libasound-dev
    - name: Build everything
      run: export JDK_HOME=$JAVA_HOME && export JAVA_ARCH=amd64 && cd build && ./buildall.sh && cd ..
  deploy:
    if: ${{ github.event_name == 'push' }}
    needs: build
    steps:
    - name: Deploy
      run: build/deploy.sh
      env:
        OPENSAGETV_TOKEN: ${{ secrets.opensagetv_token }}

name: SageTV CI GitHub Actions

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

#    runs-on: ubuntu-latest
    runs-on: ubuntu-18.04

    steps:
    - uses: actions/checkout@v2
    - name: Set up Oracle JDK 9
      uses: actions/setup-java@v2
      with:
        java-version: '9'
        distribution: 'adopt'
        cache: gradle
    - name: Update apt
      run: sudo apt-get update -qq
    - name: Install packages from apt
      run: sudo apt-get install -y unzip build-essential git libx11-dev libxt-dev libraw1394-dev libavc1394-dev libiec61883-dev libfreetype6-dev yasm autoconf libtool libaudio-dev libpulse-dev libasound-dev
    - name: Build everything
      run: export JDK_HOME=$JAVA_HOME && export JAVA_ARCH=amd64 && cd build && ./buildall.sh && cd ..
  deploy:
    runs-on: ubuntu-18.04
    if: ${{ github.event_name == 'push' }}
    needs: build
    steps:
    - uses: actions/checkout@v2
    - name: Set up Oracle JDK 9
      uses: actions/setup-java@v2
      with:
        java-version: '9'
        distribution: 'adopt'
        cache: gradle
    - name: Deploy
      run: build/deploy.sh
      env:
        OPENSAGETV_TOKEN: ${{ secrets.opensagetv_token }}

Add runs-on and JDK setup to deploy step
Add runs-on and JDK setup to deploy step
