My personal website and blog
https://earnestma.com
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
804 B
45 lines
804 B
DOMAIN = earnestma.com |
|
HUGO_BASEURL = https://$(DOMAIN)/ |
|
HUGO_FLAGS += --gc |
|
USER = earne@$(DOMAIN) |
|
WWW_ROOT = /home/earne/$(DOMAIN) |
|
|
|
WWW_RSYNC_DEST = $(USER):$(WWW_ROOT) |
|
|
|
OUTPUT_DIR = public |
|
|
|
.PHONY: hugo |
|
hugo: clean |
|
cp data/recipes.yaml static/recipes.yaml |
|
hugo -b $(HUGO_BASEURL) $(HUGO_FLAGS) |
|
|
|
.PHONY: clean |
|
clean: |
|
rm -rf $(OUTPUT_DIR) |
|
rm -rf static/recipes.yaml |
|
|
|
.PHONY: serve |
|
serve: |
|
hugo serve |
|
|
|
.PHONY: build |
|
build: hugo |
|
|
|
.PHONY: check-links |
|
check-links: hugo |
|
lychee content/ |
|
|
|
.PHONY: test |
|
test: check-links |
|
|
|
.PHONY: deploy-main |
|
deploy-main: build test |
|
rsync $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST)/ -ravz --delete |
|
|
|
.PHONY: deploy-staging |
|
deploy-staging: DOMAIN = staging.earnestma.com |
|
deploy-staging: build test |
|
rsync $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST)/ -ravz --delete |
|
|
|
.PHONY: all |
|
all: deploy-main
|
|
|