Skip to content

Commit 7fa86a6

Browse files
authored
Trying to restore timestamp in cloned repo
1 parent 89a0ca2 commit 7fa86a6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ jobs:
3939
pip install --upgrade pip
4040
pip install Pygments pandoc-include
4141
cd /home/runner/work/csci-1301.github.io/csci-1301.github.io/
42+
# Trying to restore correct timestamp after cloning
43+
# https://stackoverflow.com/a/55609950/2657549
44+
git ls-tree -r --name-only HEAD | while read filename; do
45+
unixtime=$(git log -1 --format="%at" -- "${filename}")
46+
touchtime=$(date -d @$unixtime +'%Y%m%d%H%M.%S')
47+
touch -t ${touchtime} "${filename}"
48+
done
4249
wget https://github.com/csci-1301/csci-1301.github.io/releases/download/latest/release.zip && unzip -q release.zip
4350
- name: Build 🏗️
4451
run: make all

0 commit comments

Comments
 (0)