ungleich-staticcms/Makefile
Nico Schottelius 4759060d9f makefile update
2021-11-22 15:35:30 +01:00

27 lines
683 B
Makefile

BUILDDIR?=../ungleich-staticcms-build
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/u/
all: publish
pull:
git pull
publish: pull build deploy
deploy: permissions
rsync -av --delete --exclude .lektor/ $(BUILDDIR)/u/ $(DESTINATION)
rsync -av --delete $(BUILDDIR)/sitemap.xml $(DESTINATION)
permissions: build
find $(BUILDDIR) -type f -exec chmod 0644 {} \;
find $(BUILDDIR) -type d -exec chmod 0755 {} \;
build: venv
. ./venv/bin/activate && lektor build -O $(BUILDDIR)
clean:
rm -rf $(BUILDDIR)
venv: requirements.txt
python3 -m venv venv
sh -c ". ./venv/bin/activate && pip install -r requirements.txt"