You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
last-modified is not working as expected when rendering on github actions as Git does not store last modified date #5967
In a github action rendering, there will be a checkout at each rendering. This implies that the last modified date of each file will be the same as the git checkout date. This is because of the fact that git does not store last modified date information.
There are workaround to restore date of file to last commit date for the files:
I suspect that the last modified date is coming from the date the date when github CI clones the repo (and hence today's date) rather than when the file was checked into the repo (which is the true last-modified date).
Is it possible to somehow use the date when the file was last committed to git, for example, similar to what is available for hugo
Reacted by Mitch Beebe, Lennart Wittkuhn, Martin Laptev, Johan Larsson, Kasia Kedzierska and sharon
For now, I am just using quarto publish locally, but still intend to figure this out when I have time. I was writing a blog post on using git and this issue prompted me to pause working on it and then I got busy with other things.
Activity
maptv commentedon Dec 3, 2023
I have this same problem.
There are two relevant solutions provided on SO.
I’m going to try resolving this issue with this GitHub Action.
maptv commentedon Dec 3, 2023
I see now that there’s already a solution in the associated discussion: #5899 (reply in thread)
jolars commentedon May 31, 2024
Did you get this to work? I have tried the script at #5899 (and this one too), as well as the github action, but I still don't get this to work.
Could it be related to the workflow initiated by github when the website is pushed to the gh-pages branch includes a checkout?
maptv commentedon May 31, 2024
For now, I am just using
quarto publishlocally, but still intend to figure this out when I have time. I was writing a blog post on using git and this issue prompted me to pause working on it and then I got busy with other things.