Copy Repo to a Windows file folder on Push trigger


We currently have a script that looks at the legacy file folder system and on a Push command it copies the repo (currently only the files no .git files) to a File folder on our server so everyone can view the files even if they cant or don’t know how to use Git. This no longer works with the new Hash system and the legacy system will be no longer on 14 I believe. Is there a new better way to do this with the new system using hook-scripts and or CI/CD? Any recommendations or examples would be greatly appreciated.