From 760cd0b5997fb4ae681e21ca3530f4f46d8c8d77 Mon Sep 17 00:00:00 2001 From: ana Date: Tue, 27 Jul 2021 14:39:41 +0200 Subject: add deployment targets to Makefile --- .gitignore | 1 + Makefile | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 46c3855..f00a2be 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ dest/ +*.tar.gz diff --git a/Makefile b/Makefile index c58ef1f..9a461bd 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,13 @@ -.PHONY: build watch +.PHONY: build watch tar deploy build: krile ./ dest/ -c watch: bash -c "trap 'kill %1' SIGINT SIGTERM EXIT; python3 -m http.server -d dest 8000 & ag -p ./.gitignore -l | entr make build" + +tar: build + tar -C dest -cvz . > site.tar.gz + +deploy: tar + fish -c "curl --oauth2-bearer ${SOURCEHUT_TOKEN} -Fcontent=@site.tar.gz https://pages.sr.ht/publish/ana.st" -- cgit 1.4.1-2-gfad0