backy-docs/.woodpecker/publish-docs.yml

26 lines
1.1 KiB
YAML
Raw Normal View History

2023-02-20 04:22:58 +00:00
pipeline:
build:
image: klakegg/hugo:ext-debian-ci
commands:
2023-02-20 04:28:23 +00:00
- git submodule foreach 'git fetch origin; git checkout $(git describe --tags `git rev-list --tags --max-count=1`);'
2023-02-20 04:22:58 +00:00
- hugo
deploy:
2023-02-20 05:03:07 +00:00
image: codingkoopa/git-rsync-openssh
2023-02-20 04:22:58 +00:00
commands:
2023-02-20 04:52:49 +00:00
- echo "151.101.210.132 deb.debian.org" >> /etc/hosts
2023-02-20 04:46:14 +00:00
- echo "nameserver 1.1.1.1" > /etc/resolv.conf
2023-02-20 04:28:23 +00:00
- mkdir ~/.ssh && chmod -R 700 ~/.ssh
2023-02-20 05:03:07 +00:00
# - apt update -y && apt install openssh-client rsync -y
2023-02-20 04:22:58 +00:00
- echo "$SSH_HOST_KEY" > ~/.ssh/known_hosts
2023-02-20 18:29:01 +00:00
- echo 'echo "$SSH_PASSPHRASE"\n' | tr -d '\r' > ~/.ssh/.print_ssh_password
2023-02-20 18:26:38 +00:00
- cat ~/.ssh/.print_ssh_password
2023-02-20 18:23:13 +00:00
- chmod 700 ~/.ssh/.print_ssh_password
2023-02-20 04:22:58 +00:00
- eval $(ssh-agent -s)
2023-02-20 18:15:29 +00:00
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' | DISPLAY=":0.0" SSH_ASKPASS=~/.ssh/.print_ssh_password setsid ssh-add -
2023-02-20 04:22:58 +00:00
- rsync -atv --delete --progress public/ backy@backy.cybershell.xyz:docs
- rsync -atv --delete --progress vangen/ backy@backy.cybershell.xyz:vangen-go
2023-02-20 18:15:29 +00:00
secrets: [ ssh_host_key, ssh_deploy_key, ssh_passphrase ]
2023-02-20 04:22:58 +00:00
branches: master