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