name: Update Antora UI Spring

on:
  schedule:
    - cron: '0 10 * * *' # Once per day at 10am UTC
  workflow_dispatch:

permissions:
  pull-requests: write
  issues: write
  contents: write

jobs:
  update-antora-ui-spring:
    runs-on: ubuntu-latest
    name: Update on Supported Branches
    strategy:
      matrix:
        branch: [ '6.4.x', '6.5.x', 'main' ]
    steps:
      - uses: spring-io/spring-doc-actions/update-antora-spring-ui@415e2b11a766ba64799fffb5c97a4f7e17f677cf # v0.0.22
        name: Update
        with:
          docs-branch: ${{ matrix.branch }}
          token: ${{ secrets.GITHUB_TOKEN }}
          antora-file-path: 'docs/antora-playbook.yml'
  update-antora-ui-spring-docs-build:
    runs-on: ubuntu-latest
    name: Update on docs-build
    steps:
      - uses: spring-io/spring-doc-actions/update-antora-spring-ui@415e2b11a766ba64799fffb5c97a4f7e17f677cf # v0.0.22
        name: Update
        with:
          docs-branch: 'docs-build'
          token: ${{ secrets.GITHUB_TOKEN }}
