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 896eeab004 - 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}" URL="${URL:-blog.vezpi.com}"
BRANCH="${BRANCH:-preview}" BRANCH="${BRANCH:-preview}"
BLOG_DIR="${BLOG_DIR:-/blog}" BLOG_DIR="${BLOG_DIR:-/blog}"
HUGO_RESOURCE_DIR="${HUGO_RESOURCE_DIR:-/hugo-resources}" HUGO_RESOURCES_DIR="${HUGO_RESOURCES_DIR:-/hugo-resources}"
DRAFTS="" DRAFTS=""
# Add drafts for preview # Add drafts for preview
@@ -23,8 +23,8 @@ echo "- Cloning $REPO_URL (branch: $BRANCH)..."
git clone --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$BLOG_DIR" git clone --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$BLOG_DIR"
# Restore persistent Hugo resources cache # Restore persistent Hugo resources cache
rm -rf "$CLONE_DIR/resources" rm -rf "$BLOG_DIR/resources"
ln -s "$HUGO_RESOURCE_DIR" "$CLONE_DIR/resources" ln -s "$HUGO_RESOURCES_DIR" "$BLOG_DIR/resources"
# Generate static files with hugo # Generate static files with hugo
echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..." echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..."