feat: use persistent hugo resources folder #15
@@ -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-resources}"
|
||||
HUGO_RESOURCES_DIR="${HUGO_RESOURCES_DIR:-/hugo-resources}"
|
||||
DRAFTS=""
|
||||
|
||||
# Add drafts for preview
|
||||
@@ -23,8 +23,8 @@ 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"
|
||||
rm -rf "$BLOG_DIR/resources"
|
||||
ln -s "$HUGO_RESOURCES_DIR" "$BLOG_DIR/resources"
|
||||
|
||||
# Generate static files with hugo
|
||||
echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..."
|
||||
|
||||
Reference in New Issue
Block a user