Files
alexanderwhitestone.com/Makefile

32 lines
765 B
Makefile

.PHONY: dev build deploy clean
# Local development server
dev:
@echo "Starting dev server on :8080..."
@cd "$(CURDIR)" && python3 -m http.server 8080
# Build the static site (generate blog index + RSS from posts)
build:
@echo "Building the Tower..."
@python3 scripts/build.py
@echo "Done."
# Deploy — configure DEPLOY_TARGET in environment or .env
deploy: build
@echo "Deploying..."
@if [ -z "$${DEPLOY_TARGET:-}" ]; then \
echo "Error: Set DEPLOY_TARGET (e.g., user@host:/var/www/tower)"; \
exit 1; \
fi
rsync -avz --delete \
--exclude '.git' \
--exclude 'scripts/' \
--exclude 'Makefile' \
--exclude '*.md' \
./ "$${DEPLOY_TARGET}/"
@echo "Deployed to $${DEPLOY_TARGET}"
# Clean generated files
clean:
@echo "Nothing to clean yet."