blog/Makefile
2025-04-02 13:36:16 +02:00

31 lines
542 B
Makefile

# Makefile
.PHONY: build
# if a file .local exists run site locally
ifeq ($(wildcard .local),)
TARGET = site_remote
else
TARGET = site_local
endif
site: site_local
echo $(TARGET)
site_remote:
git pull
makesite
systemctl reload nginx
site_local:
uv run python makesite.py --params params-local.json
cd _site && python -m SimpleHTTPServer 2> /dev/null || python3 -m http.server
# docker build
build:
docker build -t source.madyanne.fr/yax/blog .
# docker publish
publish:
docker push source.madyanne.fr/yax/blog