From e86e128f406d38f570e760ac627790fd8e1dbb14 Mon Sep 17 00:00:00 2001 From: lauralani Date: Wed, 28 Feb 2024 10:03:52 +0100 Subject: [PATCH] add cloudflare CI --- .woodpecker/deploy-cloudflare.yaml | 41 ++++++++++++++++++++++++++++++ .woodpecker/deploy-netlify.yaml | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .woodpecker/deploy-cloudflare.yaml diff --git a/.woodpecker/deploy-cloudflare.yaml b/.woodpecker/deploy-cloudflare.yaml new file mode 100644 index 0000000..e0b92ec --- /dev/null +++ b/.woodpecker/deploy-cloudflare.yaml @@ -0,0 +1,41 @@ +steps: + build: + image: golang:1.21-bookworm + environment: + - HUGO_VERSION=0.123.4 + - TZ=Europe/Berlin + when: + - event: push + branch: [main, staging] + commands: + - wget https://github.com/gohugoio/hugo/releases/download/v$${HUGO_VERSION}/hugo_extended_$${HUGO_VERSION}_linux-amd64.deb && apt install ./hugo_extended_$${HUGO_VERSION}_linux-amd64.deb && rm -f hugo_extended_$${HUGO_VERSION}_linux-amd64.deb + - hugo --minify --destination ./public + + deploy-production: + image: node:alpine + # image: lauralani/netlify-cli:latest + pull: true + when: + - event: push + branch: staging + secrets: + - CLOUDFLARE_ACCOUNT_ID + - CLOUDFLARE_API_TOKEN + commands: + - npm install wrangler --save-dev + - npx wrangler pages deploy ./public --project-name adorable-website + + + #deploy-production: + # # image: node:alpine + # image: lauralani/netlify-cli:latest + # pull: true + # when: + # - event: push + # branch: main + # secrets: + # - NETLIFY_AUTH_TOKEN + # - NETLIFY_SITE_ID + # commands: + # # - npm install netlify-cli -g + # - netlify deploy --prod --dir ./public diff --git a/.woodpecker/deploy-netlify.yaml b/.woodpecker/deploy-netlify.yaml index 2bcf4e2..fca9ce5 100644 --- a/.woodpecker/deploy-netlify.yaml +++ b/.woodpecker/deploy-netlify.yaml @@ -2,7 +2,7 @@ steps: build: image: golang:1.21-bookworm environment: - - HUGO_VERSION=0.120.4 + - HUGO_VERSION=0.123.4 - TZ=Europe/Berlin when: - event: push