This repository has been archived on 2025-08-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
hugo-mistergeek/scripts/build.sh
2025-08-19 23:48:30 +02:00

36 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# Exit immediately if a command exits with a non-zero status.
set -e
# Log the start of the build process
echo "Starting build process..."
# Log the beginning of CSS compilation
echo "Building CSS..."
# Assuming sass is installed and available in the environment or Docker image
# Compile theme.scss to theme.css
echo "Compiling SASS to CSS..."
sass assets/css/scss/theme.scss static/assets/css/theme.css
echo "CSS compilation completed successfully."
# Log the beginning of data fetching from WordPress
echo "Fetching content from WordPress..."
# Assuming Node.js and Yarn are installed and available in the environment or Docker image
yarn run fetch-data
echo "Content fetched successfully from WordPress."
# Log the beginning of content generation for Hugo
echo "Generating content for Hugo..."
yarn run generate-content
echo "Content generation for Hugo completed successfully."
# Log the beginning of Hugo production build
echo "Generating production build with Hugo..."
# Assuming Hugo is installed and available in the environment or Docker image
hugo --minify --environment production --config hugo.toml
echo "Hugo production build completed successfully."
# Log the successful completion of the build process
echo "Build process completed successfully!"