Compare commits
2 commits
ff389ba1fa
...
0986c64a80
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | 0986c64a80 | ||
Bruno BELANYI | 1a2dd074cb |
|
@ -34,9 +34,9 @@ local Pipeline(isDev) = {
|
||||||
],
|
],
|
||||||
environment: {
|
environment: {
|
||||||
SSH_HOST: { from_secret: "ssh_host" },
|
SSH_HOST: { from_secret: "ssh_host" },
|
||||||
TARGET: { from_secret: "ssh_target" + if isDev then "_dev" else "" },
|
SSH_TARGET: { from_secret: "ssh_target" + if isDev then "_dev" else "" },
|
||||||
USERNAME: { from_secret: "ssh_user" },
|
SSH_USER: { from_secret: "ssh_user" },
|
||||||
KEY: { from_secret: "ssh_key" },
|
SSH_KEY: { from_secret: "ssh_key" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
9
Makefile
9
Makefile
|
@ -14,9 +14,12 @@ serve:
|
||||||
hugo server -D -F
|
hugo server -D -F
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
@if [ -n "$$KEY" ]; then eval "$$(ssh-agent)"; echo "$$KEY" | ssh-add -; fi
|
@if [ -n "$$SSH_KEY" ]; then eval "$$(ssh-agent)"; echo "$$SSH_KEY" | ssh-add -; fi
|
||||||
if [ -z "$$USERNAME" ] || [ -z "$$SSH_HOST" ] || [ -z "$$TARGET" ]; then exit 1; fi
|
@if [ -z "$$SSH_USER" ] || [ -z "$$SSH_HOST" ] || [ -z "$$SSH_TARGET" ]; \
|
||||||
rsync --progress -avz --delete public/ "$$USERNAME@$$SSH_HOST:$$TARGET"
|
then echo "Missing one of SSH_USER, SSH_HOST, or TARGET" >&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
rsync --progress -avz --delete public/ "$$SSH_USER@$$SSH_HOST:$$TARGET"
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in a new issue