Avik
Avik

Reputation: 679

Stop triggering GitHub Actions on updating some files in repository

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.

Upvotes: 5

Views: 2197

Answers (1)

Avik
Avik

Reputation: 679

This will do the work:

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

Upvotes: 7

Related Questions