add CI/CD: MkDocs build + Docker deploy on port 20000
Deploy Docs / deploy (push) Failing after 47s

- .gitea/workflows/deploy.yaml: Actions pipeline
- Dockerfile: nginx:alpine serving site/
- nginx.conf: SPA routing + gzip + cache
- .dockerignore: exclude source files
- .gitignore: exclude site/ (built in CI)
This commit is contained in:
wonder
2026-08-24 02:31:40 +00:00
parent 5718b98ffc
commit 5a0aa9ffbb
61 changed files with 89 additions and 16553 deletions
+26
View File
@@ -0,0 +1,26 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# MkDocs Material 使用 SPA 风格路由,需要回退到 index.html
location / {
try_files $uri $uri/ $uri.html /index.html;
}
# 404 也回退到 index.html(搜索功能需要)
error_page 404 /404.html;
# Gzip 压缩
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
gzip_min_length 256;
# 静态资源缓存
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 7d;
add_header Cache-Control "public, no-transform";
}
}