30 lines
754 B
Makefile
30 lines
754 B
Makefile
BUILDDIR?=../ungleich-staticcms-build
|
|
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
|
|
|
ifeq ($(BRANCH), "master")
|
|
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/u/
|
|
else
|
|
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/u/
|
|
endif
|
|
|
|
|
|
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:
|
|
lektor build -O $(BUILDDIR)
|
|
|
|
clean:
|
|
rm -rf $(BUILDDIR)
|