EquipmentTracker-Frontend/.woodpecker.yml

18 lines
606 B
YAML
Raw Normal View History

2023-12-04 19:21:15 +08:00
# .woodpecker.yml
steps:
- name: build & copy
image: node:18-alpine
2023-12-04 19:16:47 +08:00
commands:
- apk add --no-cache openssh-client
- mkdir -p /root/.ssh/
2023-12-04 20:02:49 +08:00
- echo "$SSH_KEY" | tr -d '\r' > /root/.ssh/id_rsa
2023-12-04 19:16:47 +08:00
- chmod 600 /root/.ssh/id_rsa
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config
- npm install
- npm run build
2023-12-18 20:47:13 +08:00
- ssh root@10.0.10.4 'rm -rf /mnt/sda1/files/projects/equipment_tracker_frontend/*'
2023-12-04 20:06:48 +08:00
- scp -r dist/* root@10.0.10.4:/mnt/sda1/files/projects/equipment_tracker_frontend
when:
- branch: master
2023-12-04 19:57:24 +08:00
secrets: [SSH_KEY]