feat: add CI/CD pipeline with Docker + Nginx
Deploy / deploy (push) Failing after 1m30s

- Add Gitea Actions workflow for auto-deploy on push to main
- Add Dockerfile (nginx:alpine based, with layer caching)
- Add nginx.conf (gzip, autoindex, static caching)
- Add .dockerignore
- Migrate cache.html → cache/index.html for directory-based routing
This commit is contained in:
枫
2026-08-23 14:24:47 +00:00
parent d66ee84f79
commit c96c23a7c5
5 changed files with 84 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Gzip compression
gzip on;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
gzip_min_length 256;
# Static assets caching
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff2|ttf)$ {
expires 7d;
add_header Cache-Control "public, no-transform";
}
# Auto-index at root for listing available pages
location / {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
# Each subdirectory serves its page
location ~ ^/([^/]+)/ {
try_files $uri $uri/ /$1/index.html;
}
}