Build only when folder is changed

I’d like to have my workflow only run when a specific folder has a commit. I’ve seen a folder check if conditional, but that runs when the container has already booted.

I’ve also seen this link on a .ciignore, but it seems a bit complex. Is there a simpler way to do this?

To be clear, its like ignoring every folder but one.

Edit: I did set up that file and read through it a little. Looks like it just needs to be rewritten to check if a folder in the ciignore is there, and break when it is. Sadly, my bash knowledge is not that great.

Edit2: Sadly the commit-msg disapears on every push it seems. So another way to check a folder would be nice. Still using a workflow with multiple branches. Same functionality of [skip ci].

I’d also would like to run a workflow only when a directory is changed. I have a documentation website in a /docs directory, and I’d like to build and publish it when I merge a PR from github with some changes in it.