backy-docs/.woodpecker/publish-docs.yml
2023-02-19 23:27:12 -06:00

24 lines
1.0 KiB
YAML

pipeline:
build:
image: klakegg/hugo:ext-debian-ci
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 "151.101.210.132 deb.debian.org" >> /etc/hosts
- echo "nameserver 1.1.1.1" > /etc/resolv.conf
- mkdir ~/.ssh && chmod -R 700 ~/.ssh
# - apt update -y && apt install openssh-client rsync -y
- echo "$SSH_HOST_KEY" > ~/.ssh/known_hosts
- echo 'echo "$SSH_PASSPHRASE"' > ~/.ssh/.print_ssh_password
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/backy.cybershell.xyz
- chmod 600 ~/.ssh/backy.cybershell.xyz
- DISPLAY=":0.0" SSH_ASKPASS=~/.ssh/.print_ssh_password setsid ssh-add ~/.ssh/backy.cybershell.xyz
- rsync -atv --delete --progress public/ backy@backy.cybershell.xyz:docs
- rsync -atv --delete --progress vangen/ backy@backy.cybershell.xyz:vangen-go
branches: master