---
name: Scheduled build for latest docs
"on":
  schedule:
    # Run at 05:41 on Monday
    - cron: '41 5 * * 1'

jobs:
  build-package-docs:
    name: 📝 Build
    uses: ./.github/workflows/reusable-build-docs.yaml
    with:
      repository-branch: 'stable-2.19'
      ansible-package-version: '12'
    secrets:
      DOCS_BOT_TOKEN: ${{ secrets.DOCS_BOT_TOKEN }}

  deploy-package-docs:
    name: 🚀 Deploy
    needs: build-package-docs
    uses: ./.github/workflows/reusable-deploy-docs.yaml
    with:
      ansible-package-version: '12'
      deployment-environment: 'production'
      repository-branch: 'stable-2.19'
    secrets:
      DEPLOY_DOC_BUILD: ${{ secrets.DEPLOY_DOC_BUILD }}
