name: Update CELINE docs

on:
    push:
        branches: [main]
        paths:
            - "README.md"
            - "specs/**"
            - "releases/**"

jobs:
    notify:
        runs-on: ubuntu-latest

        steps:
            - name: Trigger website rebuild
              uses: peter-evans/repository-dispatch@v4
              with:
                  token: ${{ secrets.CELINE_WEBSITE_TOKEN }}
                  repository: celine-eu/celine-eu.github.io
                  event-type: celine-docs-update
                  client-payload: |
                      {
                        "source_repo": "${{ github.repository }}",
                        "ref": "${{ github.ref }}",
                        "sha": "${{ github.sha }}"
                      }
