2023-03-30 05:55:56 +00:00
|
|
|
pipeline:
|
|
|
|
build:
|
|
|
|
image: nixos/nix
|
|
|
|
commands:
|
2023-03-30 05:56:27 +00:00
|
|
|
- ./ci/build-docs.sh
|
2023-03-30 05:55:56 +00:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
image: alpine
|
|
|
|
commands:
|
|
|
|
- apk add rsync openssh
|
|
|
|
- echo "$${SSH_SECRET_KEY}" > SSH_SECRET_KEY
|
|
|
|
- chmod 600 SSH_SECRET_KEY
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzBZ+QmM4EO3Fwc1ZcvWV2IY9VF04T0H9brorGj9Udp" >> ~/.ssh/known_hosts
|
|
|
|
- rsync -azvrP -e "ssh -i SSH_SECRET_KEY" docs/book/ sourcehutBuilds@mzhang.io:/mnt/storage/svcdata/blog-public/panorama
|
|
|
|
secrets: [SSH_SECRET_KEY]
|
|
|
|
when:
|
|
|
|
branch: master
|