diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 04f660a..063532e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,8 +23,16 @@ jobs: with: node-version: 14 registry-url: https://registry.npmjs.org/ + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + src_static: + - 'src/static/**' + src_templates: + - 'src/templates/**' - name: Increment Version (for security - and CSP asset alignment - every change to the template files is a breaking change) - # TODO: Make this conditional on if template files have actually changed + if: steps.filter.outputs.src_static == 'true' || steps.filter.outputs.src_templates == 'true' run: npm version major - name: Install and Build using incremented version run: npm ci diff --git a/README.md b/README.md index 6057781..d6ce9c2 100644 --- a/README.md +++ b/README.md @@ -215,4 +215,4 @@ All changes that impact the output dataset site templates or static assets MUST Minor and patch version numbers may be used to update any functionality of the npm library that impacts direct users of that library, but does not impact the templates or static assets themselves. -*NOTE*: All commits to master currently trigger a major version bump in CI by default. +*NOTE*: Only commits to master src/static/ and src/templates/ currently trigger a major version bump in CI by default.