Blog/docker/entrypoint.sh
Vezpi c05ccae7ff
All checks were successful
Deploy / Deploy (push) Successful in 4s
change: harden hugo page generation
2025-06-02 12:56:18 +00:00

17 lines
558 B
Bash

#!/bin/sh
set -e
# Configuration
REPO_URL="${REPO_URL:-https://git.vezpi.me/Vezpi/blog.git}"
BRANCH="${BRANCH:-preview}"
CLONE_DIR="${CLONE_DIR:-/blog}"
echo "Cloning $REPO_URL (branch: $BRANCH)..."
git clone --depth 1 --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR"
echo "Building site with Hugo $HUGO_VERSION..."
hugo --source "$CLONE_DIR" --destination "$HUGO_DEST" --cleanDestinationDir --gc --verbose --panicOnWarning --printI18nWarnings --templateMetrics --templateMetricsHints
echo "Starting Nginx..."
exec nginx -g 'daemon off;'