DDRCompanion/.woodpecker.yml
2024-05-14 18:45:01 -04:00

22 lines
631 B
YAML

steps:
build:
image: node:20
commands:
- npm install -g pnpm
- pnpm install
- pnpm run build
deploy:
image: alpine
environment:
BASE_URL: /ddr
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 AAAAC3NzaC1lZDI1NTE5AAAAIO+RKFYjD8UjqhfOHFHNyijkbGzC4fJEIIhrBwHj+FsQ" >> ~/.ssh/known_hosts
- rsync -azrP -e "ssh -i SSH_SECRET_KEY" dist/ blogDeploy@mzhang.io:/home/blogDeploy/public/ddr
secrets: [SSH_SECRET_KEY]
when:
branch: master