Scripts Directory
Scripts Directory
This directory contains utility scripts for the status.health® blog.
local-deploy.sh
A unified script for local development, testing, and deployment preparation.
Usage
./local-deploy.sh [action] [options]
Available Actions
- serve (default) - Start the development server with live reload
- build - Build the site without serving
- test - Run the test suite
- clean - Clean build artifacts
- install - Install Ruby and Jekyll dependencies
- check - Check configuration and dependencies
- newsletter - Test newsletter integration
- help - Show help message
Options
-p, --port PORT
- Port to serve on (default: 4000)-h, --host HOST
- Host to bind to (default: 0.0.0.0)--no-open
- Don’t open browser automatically
Examples
# Start development server (default action)
./local-deploy.sh
# Run tests
./local-deploy.sh test
# Build and test
./local-deploy.sh build && ./local-deploy.sh test
# Serve on different port
./local-deploy.sh serve -p 5000
# Check configuration
./local-deploy.sh check
# Test newsletter integration (requires NEWSLETTER_WEBHOOK_SECRET env var)
export NEWSLETTER_WEBHOOK_SECRET='your-secret'
./local-deploy.sh newsletter
Other Scripts
Newsletter Testing Scripts
- test-newsletter-webhook.rb - Test webhook endpoint directly
- test-newsletter-integration.sh - Comprehensive newsletter integration tests
- simulate-github-action.rb - Simulate GitHub Actions environment locally
These scripts are used for testing the newsletter webhook integration and can be run independently or through the main local-deploy.sh
script.