feat: use persistent hugo resources folder #15

Merged
Vezpi merged 4 commits from feat/hugo-cache-dir into preview 2026-09-16 10:55:41 +02:00
Showing only changes of commit 4609bac7dc - Show all commits
+3 -3
View File
@@ -6,7 +6,7 @@ REPO_URL="${REPO_URL:-https://git.vezpi.com/Vezpi/blog.git}"
URL="${URL:-blog.vezpi.com}"
BRANCH="${BRANCH:-preview}"
BLOG_DIR="${BLOG_DIR:-/blog}"
HUGO_RESOURCE_DIR="${HUGO_RESOURCE_DIR:-/hugo-cache}"
HUGO_CACHE_DIR="${HUGO_CACHE_DIR:-/hugo-cache}"
DRAFTS=""
# Add drafts for preview
@@ -19,7 +19,7 @@ fi
rm -rf "$BLOG_DIR"
# Create Hugo resource folder
mkdir -p "$HUGO_RESOURCE_DIR"
mkdir -p "$HUGO_CACHE_DIR"
# Clone repo
echo "- Cloning $REPO_URL (branch: $BRANCH)..."
@@ -29,7 +29,7 @@ git clone --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$BLOG_DIR"
echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..."
hugo --source "$BLOG_DIR" \
--destination "$HUGO_DEST" \
--resourceDir "$HUGO_RESOURCE_DIR" \
--cacheDir "$HUGO_CACHE_DIR" \
--baseURL="https://${URL}" \
${DRAFTS} \
--logLevel info \