blog/.woodpecker.yml

20 lines
577 B
YAML
Raw Normal View History

2023-02-04 07:04:29 +00:00
pipeline:
build:
2023-08-31 08:07:03 +00:00
image: node:18
2023-02-04 07:04:29 +00:00
commands:
2023-08-31 08:07:03 +00:00
- npm install
- npm run build
2023-02-04 07:04:29 +00:00
deploy:
image: alpine
commands:
2023-02-04 07:11:56 +00:00
- apk add rsync openssh
2023-02-04 07:18:38 +00:00
- echo "$${SSH_SECRET_KEY}" > SSH_SECRET_KEY
2023-02-04 07:12:21 +00:00
- chmod 600 SSH_SECRET_KEY
2023-02-04 07:10:28 +00:00
- mkdir -p ~/.ssh
2023-02-04 07:04:29 +00:00
- echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzBZ+QmM4EO3Fwc1ZcvWV2IY9VF04T0H9brorGj9Udp" >> ~/.ssh/known_hosts
2023-08-31 08:07:03 +00:00
- rsync -azvrP -e "ssh -i SSH_SECRET_KEY" dist/ sourcehutBuilds@mzhang.io:/mnt/storage/svcdata/blog-public
secrets: [SSH_SECRET_KEY]
2023-02-04 07:04:29 +00:00
when:
branch: master