Add deploy script
This commit is contained in:
parent
26a57aeff1
commit
9c2bd43c8f
3 changed files with 11 additions and 7 deletions
5
Makefile
5
Makefile
|
@ -8,23 +8,18 @@ BASE_TITLE = Recycled Cloud
|
||||||
PAGES = index.html services.html manifesto.html contact.html
|
PAGES = index.html services.html manifesto.html contact.html
|
||||||
BLOBS = assets/
|
BLOBS = assets/
|
||||||
|
|
||||||
# Default target.
|
|
||||||
all: $(PAGES)
|
all: $(PAGES)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(PAGES)
|
rm -rf $(PAGES)
|
||||||
|
|
||||||
# If you built it, flaunt it!
|
|
||||||
deploy: $(PAGES) $(BLOBS)
|
deploy: $(PAGES) $(BLOBS)
|
||||||
./deploy.sh $^
|
./deploy.sh $^
|
||||||
|
|
||||||
.part.html:
|
.part.html:
|
||||||
./page-template.sh $+ > $@
|
./page-template.sh $+ > $@
|
||||||
|
|
||||||
# Setup some common dependencies so updating targets work.
|
|
||||||
$(PAGES): page-template.sh assets
|
$(PAGES): page-template.sh assets
|
||||||
|
|
||||||
# Modify variables ?
|
|
||||||
index.html: TITLE = "$(BASE_TITLE) | Home"
|
index.html: TITLE = "$(BASE_TITLE) | Home"
|
||||||
services.html: TITLE = "$(BASE_TITLE) | Services"
|
services.html: TITLE = "$(BASE_TITLE) | Services"
|
||||||
manifesto.html: TITLE = "$(BASE_TITLE) | Manifesto"
|
manifesto.html: TITLE = "$(BASE_TITLE) | Manifesto"
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
Static website generated with [Nyll](https://git.sr.ht/~sparrowhawk/nyll). Depends on:
|
Static website generated with [Nyll](https://git.sr.ht/~sparrowhawk/nyll). Depends on:
|
||||||
|
|
||||||
* `make`
|
* `make`
|
||||||
* `sh`
|
* `sh`
|
||||||
|
|
9
deploy.sh
Executable file
9
deploy.sh
Executable file
|
@ -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
|
Loading…
Reference in a new issue