name: Generate documentation

on:
    push:
        branches: [main]
    pull_request:
        branches: [main]

jobs:
    docs:
        runs-on: ubuntu-latest

        steps:
          - name: Trigger documentation hook
            run: |
                curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept:application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/xdan/jodit-autodoc/dispatches --data '{"event_type": "opened" }'
