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