fix: remove cacheDir and use symlink
Blog Test / Check-Rebuild (push) Successful in 6s
Blog Test / Build (push) Successful in 6s
Blog Test / Deploy-Test (push) Successful in 34s
Blog Test / Test (push) Failing after 2s

This commit is contained in:
2026-09-16 08:43:16 +00:00
parent 4609bac7dc
commit 2da3d1823e
+5 -5
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_CACHE_DIR="${HUGO_CACHE_DIR:-/hugo-cache}"
HUGO_RESOURCE_DIR="${HUGO_RESOURCE_DIR:-/hugo-resources}"
DRAFTS=""
# Add drafts for preview
@@ -18,18 +18,18 @@ fi
# Clean blog dir
rm -rf "$BLOG_DIR"
# Create Hugo resource folder
mkdir -p "$HUGO_CACHE_DIR"
# Clone repo
echo "- Cloning $REPO_URL (branch: $BRANCH)..."
git clone --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$BLOG_DIR"
# Restore persistent Hugo resources cache
rm -rf "$CLONE_DIR/resources"
ln -s "$HUGO_RESOURCE_DIR" "$CLONE_DIR/resources"
# Generate static files with hugo
echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..."
hugo --source "$BLOG_DIR" \
--destination "$HUGO_DEST" \
--cacheDir "$HUGO_CACHE_DIR" \
--baseURL="https://${URL}" \
${DRAFTS} \
--logLevel info \