personal-website/.woodpecker/deploy-netlify.yaml
lauralani 488f25d1a2
Some checks failed
ci/woodpecker/push/deploy-netlify Pipeline failed
update CI
2023-09-01 15:58:15 +02:00

41 lines
1.1 KiB
YAML

steps:
build:
image: golang:1.20-bookworm
environment:
- HUGO_VERSION=0.117.0
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
- timedatectl set-timezone Europe/Berlin
- hugo --minify --destination ./public
deploy-staging:
# image: node:alpine
image: lauralani/netlify-cli:latest
pull: true
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
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