m2.nz/.woodpecker.yml

19 lines
664 B
YAML
Raw Normal View History

2022-09-12 04:39:16 +00:00
pipeline:
build:
image: golang
environment:
- HUGO_VERSION=0.102.3
commands:
2022-09-12 04:59:19 +00:00
- echo "Installing Hugo $${HUGO_VERSION}"
2022-09-12 04:55:26 +00:00
- wget https://github.com/gohugoio/hugo/releases/download/v$${HUGO_VERSION}/hugo_extended_$${HUGO_VERSION}_Linux-64bit.deb
- dpkg -i hugo_extended_$${HUGO_VERSION}_Linux-64bit.deb
2022-09-12 04:59:19 +00:00
- hugo
2022-09-12 05:12:19 +00:00
- echo "Deploying new version"
- ssh-keygen -R $M2_HOST
2022-09-12 05:07:49 +00:00
- echo $M2_DEPLOY_KEY > privkey
2022-09-12 05:12:19 +00:00
- scp -i privkey -r public root@$M2_HOST:/var/www/m2.nz/
- ssh -i privkey root@M2_HOST 'sudo systemctl reload nginx.service'
2022-09-12 05:07:49 +00:00
- rm -fr privkey
2022-09-12 05:12:19 +00:00
secrets: [ m2_deploy_secret, m2_host ]