瀏覽代碼

Update 'README.md'

computer_glamour 2 周之前
父節點
當前提交
1bf09670dd
共有 1 個文件被更改,包括 15 次插入2 次删除
  1. 15 2
      README.md

+ 15 - 2
README.md

@@ -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 !!!!**
 
 ```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