2024-05-14 01:16:32 +00:00
|
|
|
steps:
|
|
|
|
clone:
|
2024-08-31 16:29:19 +00:00
|
|
|
image: hugomods/hugo:exts
|
2024-05-14 01:16:32 +00:00
|
|
|
commands:
|
|
|
|
- git submodule foreach 'git fetch origin; git checkout $(git describe --tags `git rev-list --tags --max-count=1`);'
|
|
|
|
- hugo
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
image: codingkoopa/git-rsync-openssh
|
|
|
|
commands:
|
|
|
|
- echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
|
|
|
- mkdir ~/.ssh && chmod -R 700 ~/.ssh
|
|
|
|
- echo "$SSH_HOST_KEY" > ~/.ssh/known_hosts
|
|
|
|
- echo -e '#!/bin/sh\necho "$SSH_PASSPHRASE"' | tr -d '\r' > ~/.ssh/.print_ssh_password
|
|
|
|
- chmod 700 ~/.ssh/.print_ssh_password
|
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' | DISPLAY=":0.0" SSH_ASKPASS=~/.ssh/.print_ssh_password setsid ssh-add -
|
|
|
|
- rsync -atv --delete --progress public/ andrew@andrewnw.xyz:/home/andrew/andrewnw.xyz/
|
|
|
|
secrets: [ ssh_host_key, ssh_deploy_key, ssh_passphrase ]
|
|
|
|
|
|
|
|
|
2024-05-14 01:32:40 +00:00
|
|
|
when:
|
|
|
|
- event: push
|
|
|
|
branch: master
|
|
|
|
|