diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index fc6410a..2eec85e 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -8,12 +8,18 @@ on: repository_dispatch: types: [run_tests] workflow_dispatch: - + inputs: + generate_docs: + description: "Regenerate docs" + required: false + type: boolean jobs: tests: name: 🎯 Dispatch changes runs-on: ubuntu-22.04 + env: + DISPATCH_TOKEN: ${{ secrets.DISPATCH_TOKEN }} permissions: actions: read contents: read @@ -25,8 +31,14 @@ jobs: with: submodules: recursive + - name: 📄 Check changed include files + id: changed-includes + uses: tj-actions/changed-files@v35 + with: + files: includes/**/*.pat + - name: ✉️ Run Documentation generator - if: ${{ env.DISPATCH_TOKEN != '' }} + if: ${{ env.DISPATCH_TOKEN != '' && (steps.changed-includes.outputs.any_changed == 'true' || inputs.generate_docs) }} uses: mvasigh/dispatch-action@main with: token: ${{ secrets.DISPATCH_TOKEN }}