Initial commit
This commit is contained in:
.gitignore.gitlab-ci.ymlCLAUDE.mdGITLAB_DEPLOYMENT.mdLICENSEREADME.mddeploy.sh
archetypes
build-test.shconfig.tomlcontent
data
components
appeal.yamlassessment.yamlbecome_aware.yamldelegation.yamldeliberation.yamlinitiation.yamlintake.yamlpreparation.yamlprepare.yamlprocess.yamlresolution.yaml
modules
assessment.yamldelegation.yamlfiling.yamlintake.yamlnotification.yamlparticipants.yamlprinciples.yamlprocess.yamlresolution.yaml
stages
static
css
js
themes/dispute-protocol-theme
41
build-test.sh
Executable file
41
build-test.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Test build script for the Dispute Protocol site
|
||||
# This script builds the site and runs a temporary server to check it works
|
||||
|
||||
set -e
|
||||
|
||||
# Colors for output
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Configuration
|
||||
BUILD_DIR="public"
|
||||
PORT=${1:-8080}
|
||||
|
||||
# Check if Hugo is installed
|
||||
if ! command -v hugo &> /dev/null; then
|
||||
echo -e "${RED}Error: Hugo is not installed. Please install Hugo first.${NC}"
|
||||
echo "Visit https://gohugo.io/installation/ for installation instructions."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}Building site...${NC}"
|
||||
hugo --minify
|
||||
|
||||
# Check if build succeeded
|
||||
if [ ! -d "$BUILD_DIR" ]; then
|
||||
echo -e "${RED}Error: Build failed. The '$BUILD_DIR' directory doesn't exist.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}Build completed successfully!${NC}"
|
||||
echo -e "${YELLOW}Starting a temporary server on port $PORT...${NC}"
|
||||
echo -e "${YELLOW}Press Ctrl+C to stop the server.${NC}"
|
||||
|
||||
cd $BUILD_DIR
|
||||
python3 -m http.server $PORT
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user