Date ambiguity for sites built with GitHub Action
Realvincentyuan opened this issue · 5 comments
Description
I have a mkdocs site hosted in GitHub, and the deployment relies on GitHub Action, every time there is an update on the main
, the update will be pushed to the site.
The issue about the feed_rss_updated.xml
is in fact every post got updated so the updated time of each post is identical, leading to the results to be identical however the update is.
Sample RSS
This is an example of the RSS feed, in fact it is static because of the cause I mentioned above. https://bullettech.github.io/BulletTech/feed_rss_updated.xml
Question
Can the git log change date be used to retrieve the list of posts that get updated lately? If using the deployed date, then the returned list always remain static seemingly.
Hello @Realvincentyuan,
Thanks for your interest.
Do you have the same issue when building your website locally?
I guess no because the full git log is available. In CI environment, you need to specify the clone depth to be sure that the checkout is complete. For example, in your Github workflow, you should use:
- name: Get source code
uses: actions/checkout@v3
with:
fetch-depth: 0
Additionally, you can have a look to the README of the git localized revision date: https://github.com/timvink/mkdocs-git-revision-date-localized-plugin#note-when-using-build-environments
Did you try to solve your workflow @Realvincentyuan?
Any update here?
I close because it seems to be stale and there is no feedback anymore from @Realvincentyuan