update deploy strat

This commit is contained in:
ktyl 2022-03-29 22:52:38 +01:00
parent b47447f69e
commit 6012091d2c
3 changed files with 18 additions and 11 deletions

8
deploy
View File

@ -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"

View File

@ -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 SRC_DIR = src
IMG_DIR = img IMG_DIR = img
OUT_DIR = site 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") STYLES = $(shell find $(ROOT_DIR) -wholename "$(ROOT_DIR)*.css")
IMAGES = $(shell find $(IMG_DIR) -wholename "$(IMG_DIR)/*.png") 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) HTML_INCLUDES = $(shell find $(SRC_DIR)/inc_html -name *.html)
CSS_INCLUDES = $(shell find $(SRC_DIR)/inc_css -name *.css) CSS_INCLUDES = $(shell find $(SRC_DIR)/inc_css -name *.css)
@ -18,7 +22,15 @@ HTML_TARGETS = $(PAGES:$(ROOT_DIR)/%.html=$(OUT_DIR)/%.html)
CSS_TARGETS = $(STYLES:$(ROOT_DIR)/%.css=$(OUT_DIR)/%.css) CSS_TARGETS = $(STYLES:$(ROOT_DIR)/%.css=$(OUT_DIR)/%.css)
PNG_TARGETS = $(IMG_DIR)/%.png=$(OUT_DIR)/%.png PNG_TARGETS = $(IMG_DIR)/%.png=$(OUT_DIR)/%.png
run: $(HTML_TARGETS) $(CSS_TARGETS) deploy: site
cp -r $(OUT_DIR) $(SITE_NAME)
rsync -rP $(SITE_NAME) $(HOST):~
rm -r $(SITE_NAME)
ssh $(HOST) "sudo $(REMOTE_SCRIPT)"
run: site
site: $(HTML_TARGETS) $(CSS_TARGETS)
cp $(IMG_DIR)/*.png $(OUT_DIR)/ cp $(IMG_DIR)/*.png $(OUT_DIR)/
$(OUT_DIR)/%.html: $(ROOT_DIR)/%.html $(HTML_INCLUDES) $(OUT_DIR)/%.html: $(ROOT_DIR)/%.html $(HTML_INCLUDES)
@ -31,3 +43,5 @@ $(OUT_DIR)/%.css: $(ROOT_DIR)/%.css $(CSS_INCLUDES)
clean: clean:
rm -r $(OUT_DIR) rm -r $(OUT_DIR)
.PHONY: site

View File

@ -1,3 +1,4 @@
* [ ] transfer domain https://www.mythic-beasts.com/support/domains/transfer
* [-] responsive design * [-] responsive design
* [-] nav * [-] nav