Open cderv opened 1 year ago
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.
I see now that there’s already a solution in the associated discussion: https://github.com/quarto-dev/quarto-cli/discussions/5899#discussioncomment-7673260
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?
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.
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:
Maybe we could try be clever when inside a git project, or leverage the
_freeze
state for project to store information.Discussed in https://github.com/quarto-dev/quarto-cli/discussions/5899