ungleich-staticcms/Makefile

34 lines
739 B
Makefile
Raw Normal View History

BUILDDIR?=../ungleich-staticcms-build
2019-12-31 00:39:46 +00:00
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/u/
2019-09-24 12:13:26 +00:00
all: goodpush
2019-09-24 12:13:26 +00:00
2019-09-25 12:31:06 +00:00
pull:
git pull
push:
git push
goodpush:
make publish && make push
publish: pull build deploy
deploy: permissions
2019-12-31 00:39:46 +00:00
rsync -av --delete --exclude .lektor/ $(BUILDDIR)/u/ $(DESTINATION)
rsync -av --delete $(BUILDDIR)/sitemap.xml $(DESTINATION)
2019-09-24 12:13:26 +00:00
permissions: build
find $(BUILDDIR) -type f -exec chmod 0644 {} \;
find $(BUILDDIR) -type d -exec chmod 0755 {} \;
2021-11-22 14:35:30 +00:00
build: venv
. ./venv/bin/activate && lektor build -O $(BUILDDIR)
clean:
2019-12-31 00:39:46 +00:00
rm -rf $(BUILDDIR)
2021-11-22 14:35:30 +00:00
venv: requirements.txt
python3 -m venv venv
sh -c ". ./venv/bin/activate && pip install -r requirements.txt"