From ff6e03539c455b6efe7289188278aab317ff6577 Mon Sep 17 00:00:00 2001 From: Sig00rd Date: Fri, 13 Aug 2021 16:55:58 +0200 Subject: [PATCH] Add step to update 'last modified' date in docs autogen workflow (#627) --- .github/workflows/auto-gen-docs.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/auto-gen-docs.yaml b/.github/workflows/auto-gen-docs.yaml index 5d7462d8..489421ea 100644 --- a/.github/workflows/auto-gen-docs.yaml +++ b/.github/workflows/auto-gen-docs.yaml @@ -55,6 +55,12 @@ jobs: sudo npm install -D --save postcss-cli cd ../ + - name: Update last modified date in modified docs + if: env.IS_CHANGED == 'true' + run: | + git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E "^website*" \ + | sed -e 's/\(.*\)/"\1"/' | xargs sed -i "/date:/c\date: $(date +'%Y-%m-%d')" + # Runs makefile goal - checks changes to /website folder and generates docs - name: Run Makefile goal if: env.IS_CHANGED == 'true'