name: Generate Antora Files and Request Build

on:
  push:
    branches-ignore:
      - 'gh-pages'

env:
  GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Source
        uses: actions/checkout@v2
      - name: Generate antora.yml
        run: ./gradlew :spring-session-docs:generateAntora
      - name: Extract Branch Name
        id: extract_branch_name
        run: echo "##[set-output name=generated_branch_name;]$(echo ${GITHUB_REPOSITORY}/${GITHUB_REF##*/})"
      - name: Push generated antora files to the spring-generated-docs
        uses: JamesIves/github-pages-deploy-action@4.1.4
        with:
          branch:  ${{ steps.extract_branch_name.outputs.generated_branch_name }} # The branch the action should deploy to.
          folder: "spring-session-docs/build/generateAntora" # The folder the action should deploy.
          repository-name: "spring-io/spring-generated-docs"
          token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
      - name: Dispatch Build Request
        run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-projects/spring-session' "$GH_ACTIONS_REPO_TOKEN"

name: Generate Antora Files and Request Build

on:
  push:
    branches-ignore:
      - 'gh-pages'

env:
  GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Source
        uses: actions/checkout@v2
      - name: Set up JDK 17
        uses: actions/setup-java@v2
        with:
          java-version: '17'
          distribution: 'adopt'
          cache: gradle
      - name: Generate antora.yml
        run: ./gradlew :spring-session-docs:generateAntora
      - name: Extract Branch Name
        id: extract_branch_name
        run: echo "##[set-output name=generated_branch_name;]$(echo ${GITHUB_REPOSITORY}/${GITHUB_REF##*/})"
      - name: Push generated antora files to the spring-generated-docs
        uses: JamesIves/github-pages-deploy-action@4.1.4
        with:
          branch:  ${{ steps.extract_branch_name.outputs.generated_branch_name }} # The branch the action should deploy to.
          folder: "spring-session-docs/build/generateAntora" # The folder the action should deploy.
          repository-name: "spring-io/spring-generated-docs"
          token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
      - name: Dispatch Build Request
        run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-projects/spring-session' "$GH_ACTIONS_REPO_TOKEN"

Use Java 17 in antora pipeline
Use Java 17 in antora pipeline
