I was working on my game and couldn't figure out which version was deployed to github pages. So I added this to my github deploy action:
- name: save version.json file
run: >
echo '{ "hash": "'$(git rev-parse HEAD)'" }' > dist/version.json
And now I can see the git hash of the live version at https://ubershmekel.github.io/nihongo-shooter/version.json
I could probably also include more information like a label and show it in the game. But this is good enough for my needs. I'll probably include that line in all my github page deploys. Note you may or may not need to store the version.json
in a dist
folder. Cheers.
Top comments (0)