Skip to content

Commit

Permalink
ci: fix last-updated time for files
Browse files Browse the repository at this point in the history
  • Loading branch information
jolars committed May 31, 2024
1 parent 065d177 commit de1d52c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/scripts/fix-mtime
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit de1d52c

Please sign in to comment.