m2.nz/.woodpecker/.deploy.yml

12 lines
412 B
YAML
Raw Permalink Normal View History

2022-09-12 04:39:16 +00:00
pipeline:
build:
2022-09-12 05:19:03 +00:00
image: alpine
2022-09-12 08:30:55 +00:00
branches: main
2022-09-12 04:39:16 +00:00
commands:
2022-09-12 05:19:03 +00:00
- apk update
2022-09-12 05:19:45 +00:00
- apk add openssh
2022-09-12 05:50:17 +00:00
- eval $(ssh-agent -s)
- echo "$M2_DEPLOY_KEY" | tr -d '\r' | ssh-add -
2022-09-12 05:51:40 +00:00
- ssh -o StrictHostKeyChecking=no root@$M2_HOST 'cd /var/www/m2.nz && git pull && hugo && chown www-data:users -R /var/www/m2.nz && sudo systemctl reload nginx.service'
2022-09-12 05:22:34 +00:00
secrets: [ m2_deploy_key, m2_host ]