2020-07-14 17:00:41 +02:00
|
|
|
.PHONY: all
|
2021-08-08 16:01:27 +02:00
|
|
|
all: build-dev
|
2020-07-14 17:00:41 +02:00
|
|
|
|
|
|
|
.PHONY: build-dev
|
|
|
|
build-dev:
|
2021-08-08 16:01:27 +02:00
|
|
|
HUGO_BASEURL=https://dev.belanyi.fr hugo -D -F
|
2020-07-14 17:00:41 +02:00
|
|
|
|
|
|
|
.PHONY: build-prod
|
|
|
|
build-prod:
|
2021-08-08 16:01:27 +02:00
|
|
|
HUGO_ENV=production hugo --minify
|
2020-07-14 17:00:41 +02:00
|
|
|
|
|
|
|
.PHONY: serve
|
2021-08-08 16:01:27 +02:00
|
|
|
serve:
|
2020-07-15 16:59:11 +02:00
|
|
|
hugo server -D -F
|
2020-07-14 17:00:41 +02:00
|
|
|
|
2021-08-08 16:23:51 +02:00
|
|
|
deploy:
|
|
|
|
@if [ -n "$$KEY" ]; then eval "$$(ssh-agent)"; echo "$$KEY" | ssh-add -; fi
|
|
|
|
if [ -z "$$USERNAME" ] || [ -z "$$SSH_HOST" ] || [ -z "$$TARGET" ]; then exit 1; fi
|
|
|
|
rsync --progress -avz --delete public/ "$$USERNAME@$$SSH_HOST:$$TARGET"
|
|
|
|
|
2020-07-14 17:00:41 +02:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
$(RM) -r public
|