site-pro/Makefile

23 lines
471 B
Makefile

BUILD_DIR := ./build
SRCS := src/build.py src/index.html src/index.md src/assets/theme.css
.PHONY: all clean publish serve
site.tgz: $(SRCS)
mkdir -p $(BUILD_DIR)
python3 src/build.py > $(BUILD_DIR)/index.html
cp -r src/assets $(BUILD_DIR)
cd $(BUILD_DIR) && tar -cvzf ../site.tgz .
publish: site.tgz
hut pages publish -d peio.scryk.net site.tgz
serve: site.tgz
cd $(BUILD_DIR) && python3 -m http.server
clean:
rm -rf $(BUILD_DIR)
rm site.tgz
all: site.tgz