diff --git a/.gitignore b/.gitignore index 841a1e4..d60bf6b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ notes/ .direnv *~undo-tree~ **/.\#* -flake.lock \ No newline at end of file +flake.lock +publish diff --git a/Makefile b/Makefile index ede83cb..ed245fa 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ FILES := https://files.radicle.dev +NOW := $(shell date --iso-8601=seconds) +PUBLISH := ./publish/$(NOW) +GIT_STATUS := git status --porcelain default: build @@ -25,8 +28,15 @@ cloudflare: svgs: scripts/cleanup-svgs.sh assets/images/*.svg -publish: default - wrangler deploy --name="website" +publish: releases + @if [ ! -z "$$($(GIT_STATUS))" ]; \ + then \ + $(GIT_STATUS) ; \ + exit 1 ; \ + else \ + bundle exec jekyll build --destination=$(PUBLISH) ; \ + wrangler deploy --name="website" --assets=$(PUBLISH) ; \ + fi clean: @rm -rfv _site