From 187d994e6f7341aa08a9ef048a10106d13686cdd Mon Sep 17 00:00:00 2001 From: colben Date: Sun, 16 Apr 2023 22:41:26 +0800 Subject: [PATCH] update --- README.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a2148ce..4f353c9 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,29 @@ git push ``` +## 挂载 hugo 和 nginx 前端目录 +- 下载 [hugo_extended](https://github.com/gohugoio/hugo/releases) +- 解压获取可执行二进制文件 hugo +- 挂载 hugo 到 gitea 容器中 + ```yaml + - type: bind + source: ./gitea/hugo + target: /usr/bin/hugo + ``` + +- 挂载 nginx 前端目录到 gitea 容器中 + ```yaml + - type: bind + source: ./nginx/html + target: /html + ``` + ## 发布 - 配置本仓库的 post-receive 钩子,内容如下 ```bash set -euo pipefail - exec &> /var/log/gitea/post-receive.log + exec &> /opt/gitea/log/post-receive.log date +'[%F %T] Update www.colben.cn ...' cd /html/www.colben.cn env -i git pull origin master @@ -42,9 +59,7 @@ - 克隆本仓库的前端目录 ```bash docker exec -ti gitea /bin/bash # 进入 gitea 容器 - apk update - apk add --no-cache hugo # 安装 hugo - chown gitea.www-data /html + chown gitea.gitea /html su - gitea cd /html git clone https://git.colben.cn/colben/www.colben.cn.git