From 45997b1295a9489e5eb77c762150c89f052b5492 Mon Sep 17 00:00:00 2001
From: ktyl
Date: Mon, 21 Mar 2022 14:08:38 +0000
Subject: [PATCH] update deploy strat
fix typo
remove text
reorder makefile rules
---
deploy | 8 --------
makefile | 20 +++++++++++++++++---
src/root/about.html | 2 +-
src/root/gallery.html | 2 +-
todo.md | 1 +
5 files changed, 20 insertions(+), 13 deletions(-)
delete mode 100755 deploy
diff --git a/deploy b/deploy
deleted file mode 100755
index e7c7475..0000000
--- a/deploy
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-
-make run
-mv site ktyl.dev
-scp -r ktyl.dev admin@saturn:~
-rm -r ktyl.dev
-
-ssh saturn "sudo ./deploy"
diff --git a/makefile b/makefile
index dca2fae..2a98199 100644
--- a/makefile
+++ b/makefile
@@ -1,3 +1,9 @@
+SITE_NAME = ktyl.dev
+# configured in ~/.ssh/config
+HOST = pluto
+# a script on the remote server to move it on arrival
+REMOTE_SCRIPT = ./deploy-$(SITE_NAME)
+
SRC_DIR = src
IMG_DIR = img
OUT_DIR = site
@@ -8,8 +14,6 @@ PAGES = $(shell find $(ROOT_DIR) -wholename "$(ROOT_DIR)*.html")
STYLES = $(shell find $(ROOT_DIR) -wholename "$(ROOT_DIR)*.css")
IMAGES = $(shell find $(IMG_DIR) -wholename "$(IMG_DIR)/*.png")
-#IMAGES = $(IMAGES:$(shell find $(IMG_DIR) -wholename "$(IMG_DIR)/*.jpg"))
-#IMAGES = $(IMAGES:$(shell find $(IMG_DIR) -wholename "$(IMG_DIR)/*.gif"))
HTML_INCLUDES = $(shell find $(SRC_DIR)/inc_html -name *.html)
CSS_INCLUDES = $(shell find $(SRC_DIR)/inc_css -name *.css)
@@ -18,9 +22,17 @@ HTML_TARGETS = $(PAGES:$(ROOT_DIR)/%.html=$(OUT_DIR)/%.html)
CSS_TARGETS = $(STYLES:$(ROOT_DIR)/%.css=$(OUT_DIR)/%.css)
PNG_TARGETS = $(IMG_DIR)/%.png=$(OUT_DIR)/%.png
-run: $(HTML_TARGETS) $(CSS_TARGETS)
+site: $(HTML_TARGETS) $(CSS_TARGETS)
cp $(IMG_DIR)/*.png $(OUT_DIR)/
+run: site
+
+deploy: site
+ cp -r $(OUT_DIR) $(SITE_NAME)
+ rsync -rP $(SITE_NAME) $(HOST):~
+ rm -r $(SITE_NAME)
+ ssh $(HOST) "sudo $(REMOTE_SCRIPT)"
+
$(OUT_DIR)/%.html: $(ROOT_DIR)/%.html $(HTML_INCLUDES)
mkdir -p $(OUT_DIR)
python ppp/ppp.py $< $(HTML_INCLUDES) > $@
@@ -31,3 +43,5 @@ $(OUT_DIR)/%.css: $(ROOT_DIR)/%.css $(CSS_INCLUDES)
clean:
rm -r $(OUT_DIR)
+
+.PHONY: site
diff --git a/src/root/about.html b/src/root/about.html
index 4475b2b..8efff3c 100644
--- a/src/root/about.html
+++ b/src/root/about.html
@@ -27,7 +27,7 @@ by day i work with hardware, software and people finding useful things to do wit
-->
By day I work with hardware, software and people finding useful things to do with immersive technology.
-For professional inquiries, please fine me on LinkedIn.
+For professional inquiries, please find me on LinkedIn.
diff --git a/src/root/gallery.html b/src/root/gallery.html
index 75044a2..8568782 100644
--- a/src/root/gallery.html
+++ b/src/root/gallery.html
@@ -95,7 +95,7 @@
diff --git a/todo.md b/todo.md
index e77e754..7d1dbca 100644
--- a/todo.md
+++ b/todo.md
@@ -1,3 +1,4 @@
+* [ ] transfer domain https://www.mythic-beasts.com/support/domains/transfer
* [-] responsive design
* [-] nav