From 9c2bd43c8f316d6410b833b2c00e92feca9e7081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Mon, 4 Jan 2021 07:58:18 +0100 Subject: [PATCH] Add deploy script --- Makefile | 5 ----- README.md | 4 ++-- deploy.sh | 9 +++++++++ 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100755 deploy.sh diff --git a/Makefile b/Makefile index e908dd6..5bf6d8a 100644 --- a/Makefile +++ b/Makefile @@ -8,23 +8,18 @@ BASE_TITLE = Recycled Cloud PAGES = index.html services.html manifesto.html contact.html BLOBS = assets/ -# Default target. all: $(PAGES) clean: rm -rf $(PAGES) -# If you built it, flaunt it! deploy: $(PAGES) $(BLOBS) ./deploy.sh $^ .part.html: ./page-template.sh $+ > $@ -# Setup some common dependencies so updating targets work. $(PAGES): page-template.sh assets - -# Modify variables ? index.html: TITLE = "$(BASE_TITLE) | Home" services.html: TITLE = "$(BASE_TITLE) | Services" manifesto.html: TITLE = "$(BASE_TITLE) | Manifesto" diff --git a/README.md b/README.md index 0ddd69a..cdeca5c 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,5 @@ Static website generated with [Nyll](https://git.sr.ht/~sparrowhawk/nyll). Depends on: - * `make` - * `sh` +* `make` +* `sh` diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..85aacb3 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +DESTINATION=root@static.recycled.cloud:/var/www/ +WEBSITE=static.staging.recycled.cloud + +sftp -b - "$DESTINATION" <<- EOF + -rm $WEBSITE/* + $(for f in "$@"; do echo "put -R $f $WEBSITE/"; done) +EOF