danielrosehill's picture
updated
f6ba329
#!/bin/bash
# Colors for terminal output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo -e "${YELLOW}Starting deployment to Hugging Face Spaces...${NC}"
# Make sure dependencies are installed
echo -e "${YELLOW}Making sure dependencies are installed...${NC}"
npm install
# Ensure banner-fb.jpg is up-to-date
echo -e "${YELLOW}Ensuring Facebook-compatible banner image is up-to-date...${NC}"
if [ -f "convert-banner.sh" ]; then
chmod +x convert-banner.sh
./convert-banner.sh
fi
# Build the site
echo -e "${YELLOW}Building the site...${NC}"
npm run build:all
# Check if the build was successful
if [ $? -eq 0 ]; then
echo -e "${GREEN}Build successful!${NC}"
echo -e "${GREEN}Your site is ready to be deployed on Hugging Face Spaces.${NC}"
echo -e "${YELLOW}To deploy to Hugging Face Spaces, commit and push your changes to the repository.${NC}"
else
echo -e "${RED}Build failed. Please check the error messages above.${NC}"
exit 1
fi