improve deploy script
This commit is contained in:
parent
33337cf2ed
commit
fb75a9b4de
|
@ -0,0 +1,2 @@
|
|||
# build artifact
|
||||
period3.xyz
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
site=period3.xyz
|
||||
gemini=/home/gemini/gemini
|
||||
dest="$gemini/content"
|
||||
|
||||
sudo rm -r $dest/*
|
||||
sudo mv $site/* $dest
|
||||
|
||||
rm -r $site
|
||||
|
||||
printf "\n\tdone!\n\n"
|
||||
|
||||
|
||||
|
26
makefile
26
makefile
|
@ -1,6 +1,22 @@
|
|||
HOST = pluto
|
||||
SITE = period3.xyz
|
||||
.DEFAULT_GOAL := site
|
||||
|
||||
deploy:
|
||||
git push
|
||||
ssh $(HOST) ./deploy-$(SITE)
|
||||
SITE = period3.xyz
|
||||
|
||||
HOST = pluto
|
||||
HOST_DIR = $(HOST):~
|
||||
|
||||
CONTENT = content/
|
||||
DEPLOY = deploy.sh
|
||||
|
||||
site: $(SITE)
|
||||
|
||||
$(SITE): $(CONTENT)
|
||||
[ -d $(SITE) ] || rsync -rP $(CONTENT) $(SITE)
|
||||
|
||||
deploy: site
|
||||
rsync -P $(DEPLOY) $(HOST_DIR)
|
||||
rsync -rP $(SITE) $(HOST_DIR)
|
||||
ssh $(HOST) "bash -s" < $(DEPLOY)
|
||||
|
||||
clean:
|
||||
rm -r $(SITE)
|
||||
|
|
Loading…
Reference in New Issue