how to extract webpage from a git repo and then throw it into root of www server

computer_glamour 1bf09670dd Update 'README.md' пре 2 недеља
LICENSE 6d5ae3fbbb Initial commit пре 2 недеља
README.md 1bf09670dd Update 'README.md' пре 2 недеља

README.md

GOGS website sync with git repo

how to extract webpage from a git repo and then throw it into root of www server

Operations listed below need to be done at the backend of the git server !!!!

#!/bin/bash

rm /var/www/root-of-your-page/* -rf

git --git-dir=/path-to-gogs-install/gogs-repositories/username/repo-name.git archive HEAD | tar -x -C /var/www/root-of-your-page/

now run sudo crontab -e and add this to cron

*/5 * * * * /path/to/your/script.sh

This example runs every 5 min