name: publish-technical-documentation-release

on:
  push:
    branches:
      - "release-*"
    tags:
      - "v[0-9]+.[0-9]+.[0-9]+"
    paths:
      - "docs/sources/**"
  workflow_dispatch:
jobs:
  sync:
    if: github.repository == 'grafana/oncall'
    permissions:
      contents: read
      id-token: write
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: grafana/writers-toolkit/publish-technical-documentation-release@publish-technical-documentation-release/v2
        with:
          release_tag_regexp: "^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
          release_branch_regexp: "^release-(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
          release_branch_with_patch_regexp: "^release-(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
          website_directory: content/docs/oncall
