Stop triggering GitHub Actions on updating some files in repository

Viewed 477

I have a repository that has a README.md file and has GitHub Actions enabled. Whenever I edit anything in the README.md file, the Action gets triggered. I don't want my app to be rebuilt if I change only the README.md

How can I exclude some files from triggering Actions, just as we have .gitignore file to exclude some files from being committed and pushed.

1 Answers

This will do the work:

on:
  push:
    branches:
      - master
    paths-ignore:
      - '**/README.md'
Related