rolandjesse.de/Makefile
2024-10-13 18:05:26 +02:00

24 lines
569 B
Makefile

serve:
hugo server -D
# Load Hugo modules
# Install node modules
prep:
hugo mod tidy
hugo mod npm pack
npm install
# --minify: works on the final HTML output, not any (CSS, JS) assets
# see https://gohugo.io/hugo-pipes/bundling/ for the latter
# Note: as of mid 2021, '--minify' produces broken HTML. Disabled for now.
build: clean prep
hugo
# requires: source .env
deploy: build
rsync -axv --delete --ignore-errors --exclude .DS_Store --exclude .git public/ $(DEPLOY_SSH_USER)@$(DEPLOY_SSH_HOST):$(DEPLOY_SSH_PATH)
clean:
rm -rf public
.PHONY: serve clean