From 0643fad0bd1fd12211a35de37cc7c332d684c785 Mon Sep 17 00:00:00 2001 From: Dan Jones Date: Sun, 1 Jan 2023 20:39:14 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20deployment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 10 +++++++++- build/.gitignore | 1 + build/Makefile | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 build/Makefile diff --git a/Makefile b/Makefile index 07c3b70..5eebab6 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,18 @@ build/index.html: index.html config.toml compile.js node compile.js build/style.css: scss/style.scss node_modules/bootstrap/scss/_root.scss - npx sass $< $@ + npx sass --no-source-map --style=compressed $< $@ node_modules/bootstrap/scss/_root.scss: package-lock.json npm ci package-lock.json: package.json npm install + +.PHONY: deploy +deploy: ../links-pages/index.html ../links-pages/Makefile + $(MAKE) -C ../links-pages + +../links-pages/index.html: all + git rev-parse --short @ >> build/.version + rsync -av --exclude=.gitignore --exclude='*.~undo-tree~' build/ ../links-pages diff --git a/build/.gitignore b/build/.gitignore index 8278122..9837ad9 100644 --- a/build/.gitignore +++ b/build/.gitignore @@ -1,3 +1,4 @@ index.html style.css style.css.map +.version diff --git a/build/Makefile b/build/Makefile new file mode 100644 index 0000000..961567b --- /dev/null +++ b/build/Makefile @@ -0,0 +1,7 @@ +DATE=$(shell date -Is) + +.PHONY: deploy +deploy: + git add . + git commit -m "Deployed on $(DATE)" + git push codeberg pages