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