polsevev.dev/.woodpecker/main.yml

18 lines
463 B
YAML
Raw Permalink Normal View History

2024-08-03 21:12:30 +00:00
when:
- event: push
2024-08-03 23:06:19 +00:00
branch: testing
2024-08-03 21:12:30 +00:00
steps:
- name: build
2024-08-03 22:43:50 +00:00
image: local/builder
2024-08-03 22:32:30 +00:00
2024-08-03 21:12:30 +00:00
commands:
2024-08-03 21:18:04 +00:00
- npm install
- npm run build
2024-08-03 22:32:30 +00:00
- mkdir /root/.ssh && chmod 0700 /root/.ssh
2024-08-03 23:25:52 +00:00
- echo $SSH_KEY | base64 --decode >> /root/.ssh/id_rsa
2024-08-03 22:56:39 +00:00
- chmod 0600 /root/.ssh/id_rsa
2024-08-03 23:25:52 +00:00
- ssh-keyscan $REMOTE_IP >> /root/.ssh/known_hosts
2024-08-03 22:42:14 +00:00
- /bin/rsync -avzh ./dist ansible@$REMOTE_IP:/var/www/polsevev/dist
2024-08-03 23:06:19 +00:00
secrets: [ SSH_KEY, remote_ip ]