|
@@ -5,6 +5,19 @@ 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 !!!!**
|
|
**Operations listed below need to be done at the backend of the git server !!!!**
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
-git --git-dir=/path/to/repo.git archive HEAD | tar -x -C /destination/path
|
|
|
|
|
|
|
+#!/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
|
|
|
|
|
+
|
|
|
|
|
+```txt
|
|
|
|
|
+*/5 * * * * /path/to/your/script.sh
|
|
|
|
|
+
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+This example runs every 5 min
|