build(docs): provide git context for hugo enableGitInfo

This commit is contained in:
deytenit committed 2026-01-25 21:53:55 +03:00
1 parent a97f80b9cc
commit dfd685034f
2 files changed
+8 -3

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
# Exclude development and build artifacts
# Version control
.git/
!.git/
.gitignore
# Dependencies
+7 -2
View File
@@ -2,14 +2,19 @@
FROM ghcr.io/gohugoio/hugo:v0.154.5 AS builder
WORKDIR /src
COPY services/docs /src
# Copy git directory for git info metadata
COPY --chown=hugo:hugo .git /src/.git
COPY --chown=hugo:hugo services/docs /src/services/docs
USER hugo
WORKDIR /src/services/docs
RUN hugo --gc --minify
# Stage 2: Runtime
FROM nginx:alpine
COPY --from=builder /src/public /usr/share/nginx/html
COPY --from=builder /src/services/docs/public /usr/share/nginx/html
COPY ci/config/nginx/default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80