From 4667b5646134b8db31047ed4bb55cc194368d47b Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Sun, 3 Mar 2024 10:37:01 +0100 Subject: [PATCH] Only deploy docs when "docs/" folder changed --- .github/workflows/docs_cd.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/docs_cd.yml b/.github/workflows/docs_cd.yml index f89d1bb27..caae17e4e 100644 --- a/.github/workflows/docs_cd.yml +++ b/.github/workflows/docs_cd.yml @@ -17,6 +17,20 @@ on: push: branches: - main + paths: + # We only build and deploy a new version, when a user relevant files + # changed. + - "docs/**" + # We trigger also this workflow, if this workflow is changed, so that new + # changes will be applied. + - ".github/workflows/docs_cd.yml" + # The following paths are excluded from the above paths. It's important to + # list the paths at the end of the file, so that the exclude paths are + # applied. + # + # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-and-excluding-paths. + - "!website/README.md" + - "!**/*.gitignore" # Set permissions to none. #