From b8939eb0c54b74c67b2a37a57f46ebb68b3e7286 Mon Sep 17 00:00:00 2001 From: lauralani Date: Tue, 27 Jun 2023 11:10:09 +0200 Subject: [PATCH] update CI --- .../{deploy.yaml => deploy-cloud.yaml} | 0 .woodpecker/deploy-netlify.yaml | 35 +++++++++++++++++++ 2 files changed, 35 insertions(+) rename .woodpecker/{deploy.yaml => deploy-cloud.yaml} (100%) create mode 100644 .woodpecker/deploy-netlify.yaml diff --git a/.woodpecker/deploy.yaml b/.woodpecker/deploy-cloud.yaml similarity index 100% rename from .woodpecker/deploy.yaml rename to .woodpecker/deploy-cloud.yaml diff --git a/.woodpecker/deploy-netlify.yaml b/.woodpecker/deploy-netlify.yaml new file mode 100644 index 0000000..511b9fa --- /dev/null +++ b/.woodpecker/deploy-netlify.yaml @@ -0,0 +1,35 @@ +steps: + build: + image: node:19 + when: + - event: push + branch: [main, staging] + commands: + - npm install -D @11ty/eleventy + - rm -rf public/ + - npx @11ty/eleventy --input=. --output=public + + deploy-staging: + image: node:alpine + when: + - event: push + branch: staging + secrets: + - NETLIFY_AUTH_TOKEN + - NETLIFY_SITE_ID + commands: + - npm install netlify-cli -g + - netlify deploy --alias stage --dir ./public + + + deploy-production: + image: node:alpine + when: + - event: push + branch: main + secrets: + - NETLIFY_AUTH_TOKEN + - NETLIFY_SITE_ID + commands: + - npm install netlify-cli -g + - netlify deploy --alias stage --dir ./public