Makefile 896 Bytes
Newer Older
Steffen Vogel's avatar
Steffen Vogel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#DEPLOY_USER ?= fine-aachenadmin
#DEPLOY_PASS ?= $(shell pass rwth/acs/fein-webspace)
#DEPLOY_URL ?= https://web-upload.rwth-aachen.de/fine-aachen/new/

DEPLOY_USER ?= acs
DEPLOY_HOST ?= villas.fein-aachen.org
DEPLOY_PATH ?= /var/www/villas/website/

SRCDIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
BUILDDIR ?= $(SRCDIR)/build

RSYNC_OPTS ?= --archive --delete --verbose --progress --ignore-missing-args --copy-links --chown $(DEPLOY_USER):$(DEPLOY_USER)
DAVIX_OPTS ?= -r10 --userlogin $(DEPLOY_USER) --userpass $(DEPLOY_PASS)
JEKYLL_OPTS ?= -s $(SRCDIR) -d $(BUILDDIR)

16
build:
Steffen Vogel's avatar
Steffen Vogel committed
17
18
19
20
21
22
	jekyll build $(JEKYLL_OPTS)

deploy: deploy-rsync

deploy-rsync:
	rsync $(RSYNC_OPTS) $(BUILDDIR) $(DEPLOY_USER)@$(DEPLOY_HOST):$(DEPLOY_PATH)
23

Steffen Vogel's avatar
Steffen Vogel committed
24
25
26
deploy-webdav:
	# Davix returns 255 for some reason...
	davix-put $(DAVIX_OPTS) $(BUILDDIR)/ $(DEPLOY_URL) || true
27

Steffen Vogel's avatar
Steffen Vogel committed
28
.PHONY: build deploy deploy-rsync deploy-webdav