diff --git a/.github/scripts/fix-mtime b/.github/scripts/fix-mtime new file mode 100755 index 0000000..5c8983e --- /dev/null +++ b/.github/scripts/fix-mtime @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +git ls-tree -r --name-only HEAD | while read filename; do + unixtime=$(git log -1 --format="%at" -- "${filename}") + touchtime=$(date -d @$unixtime +'%Y%m%d%H%M.%S') + touch -t ${touchtime} "${filename}" +done diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ea401e8..b0f5740 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,6 +21,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Fix last modified time of files + run: bash .github/scripts/fix-mtime + - name: Render and publish uses: quarto-dev/quarto-actions/publish@v2 with: