diff --git a/.github/workflows/compile-llms-txt.yml b/.github/workflows/compile-llms-txt.yml index d2043861..c1338555 100644 --- a/.github/workflows/compile-llms-txt.yml +++ b/.github/workflows/compile-llms-txt.yml @@ -1,14 +1,19 @@ name: Compile llms.txt on: - push: + pull_request: + types: + - closed branches: - main paths: - 'docs/**/*.mdx' + - 'docs/compile_llms_txt.py' jobs: compile: + # Only run if the PR was merged (not just closed) + if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -26,4 +31,4 @@ jobs: git config --local user.name "GitHub Action" git add docs/llms.txt git commit -m "Update llms.txt" || exit 0 - git push + git push \ No newline at end of file