update CI to deploy to webserver

This commit is contained in:
lauralani 2023-02-27 11:49:47 +01:00
parent 74a1a44a3b
commit 8fde9f160e

View file

@ -3,15 +3,17 @@ packages:
- nodejs - nodejs
repositories: repositories:
nodejs: https://deb.nodesource.com/node_18.x bullseye main 1655A0AB68576280 nodejs: https://deb.nodesource.com/node_18.x bullseye main 1655A0AB68576280
environment:
NETLIFY_SITE_ID: 9e86e7a4-85e1-4039-a7df-f2d25cf8392c
secrets: secrets:
- 5f55bef1-5d12-4020-97bf-f622e50146a9 - 54755283-43f7-44a6-97fb-70db08184ff1
tasks: tasks:
- prepare: | - prepare: |
cd www-lauka-net
npm install -D @11ty/eleventy netlify-cli npm install -D @11ty/eleventy netlify-cli
- build: | - build: |
npx @11ty/eleventy --input=./www-lauka-net --output=public cd www-lauka-net
npx @11ty/eleventy --input=./ --output=public
- deploy: | - deploy: |
cd www-lauka-net
set +x && source ~/.buildsecrets && set -x set +x && source ~/.buildsecrets && set -x
npx netlify deploy --site=$NETLIFY_SITE_ID --dir=public --prod sshopts="ssh -o StrictHostKeyChecking=no"
rsync -avh --rsh="$sshopts" --delete --chown=webadmin:caddy ./public webadmin@web01vp.cloud.lauka.net:/webroot/www.lauka.net