name: Prevent non-master commits to generated files on: # https://stackoverflow.com/a/70569968/3443137 pull_request: paths: - 'dist/**' jobs: warn-user: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Warn User to not commit generated files run: bash -c 'echo "You have commited generated files (from the dist folder), this is not allowed. You can only commit files that you have manually edited" && exit 1'