1
0

README.md 520 B

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