Skip to content
Discussion options

You must be logged in to vote

You can definitely set up your GitHub Actions workflow to run only when specific files or directories change, which is a great way to save time and resources. The easiest way to do this is by using the paths or paths-ignore filters under the on event in your workflow YAML. For example, if you want the workflow to trigger only when files inside the /src folder change, you’d add something like paths: ['src/**'] to your push or pull_request triggers. This way, changes to other parts of the repo, like documentation or config files, won’t start the workflow unnecessarily. You can also use paths-ignore if you want the workflow to run on every change except certain files or folders. This filteri…

Replies: 2 comments

This comment was marked as off-topic.

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question Ask and answer questions about GitHub features and usage Workflow Deployment Topics about deploying workflows, publishing artifacts, and deployment targets in GitHub Actions. Misc General discussions about GitHub Actions that don't fit other found themes.
3 participants