aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 62e11ed..c3137f7 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -22,15 +22,25 @@ jobs:
cache: 'npm'
- name: Install Node.js packages
run: npm ci
+
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%s')"
+ - uses: dorny/paths-filter@v2
+ id: filter
+ with:
+ filters: |
+ source:
+ - 'src/**'
+ # modify version number if actual source files changed
- name: Modify version number
uses: mingjun97/file-regex-replace@v1
+ if: steps.filter.outputs.source == "true"
with:
regex: 'version: "[0-9]*",'
replacement: 'version: "${{ steps.date.outputs.date }}",'
include: 'gatsby-config\.ts'
+
- name: Clean Gatsby cache
run: npm run clean
- name: Run Gatsby Build