I noticed something peculiar today. The commit sha showed at the top right corner did not match the commit sha in my index.html file. Upon further investigation it turned out that the commit sha in my file always has a parent which is the commit sha shown in GUI.
I run a github-action weekly and the action itself commits the files. I have a python script that uses
environment variable available through github-actions for writing the commit sha in the file, which always trails what is shown in the GUI.
I suspect that since the commit happens AFTER I access the
os.environ['GITHUB\_SHA'] thats why the sha in the file always lags behind.
But this means I have been displaying incorrect information about the commit sha that is responsible for the latest file contents.
Q) Is there a means to actually write the correct sha (matching sha as the GitHub GUI) in the file while using github-actions?
Please have a look at the repository here to investigate I just said above.