2023-08-08 09:03:06 +02:00
|
|
|
steps:
|
|
|
|
build:
|
2023-11-15 15:35:29 +01:00
|
|
|
image: golang:1.21-bookworm
|
2023-08-08 09:13:04 +02:00
|
|
|
environment:
|
2024-02-28 10:03:52 +01:00
|
|
|
- HUGO_VERSION=0.123.4
|
2023-11-15 15:35:29 +01:00
|
|
|
- TZ=Europe/Berlin
|
2023-08-08 09:03:06 +02:00
|
|
|
when:
|
|
|
|
- event: push
|
|
|
|
branch: [main, staging]
|
|
|
|
commands:
|
2023-08-08 09:13:53 +02:00
|
|
|
- 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
|
2023-08-08 09:03:06 +02:00
|
|
|
- hugo --minify --destination ./public
|
2023-08-08 09:13:04 +02:00
|
|
|
|
2023-08-08 09:03:06 +02:00
|
|
|
deploy-staging:
|
2023-08-14 08:03:36 +02:00
|
|
|
# image: node:alpine
|
2023-08-14 10:32:22 +02:00
|
|
|
image: lauralani/netlify-cli:latest
|
2023-08-14 08:03:36 +02:00
|
|
|
pull: true
|
2023-08-08 09:03:06 +02:00
|
|
|
when:
|
|
|
|
- event: push
|
|
|
|
branch: staging
|
|
|
|
secrets:
|
|
|
|
- NETLIFY_AUTH_TOKEN
|
|
|
|
- NETLIFY_SITE_ID
|
|
|
|
commands:
|
2023-08-14 08:03:36 +02:00
|
|
|
# - npm install netlify-cli -g
|
2023-08-08 09:03:06 +02:00
|
|
|
- netlify deploy --alias stage --dir ./public
|
|
|
|
|
|
|
|
|
|
|
|
deploy-production:
|
2023-08-14 08:03:36 +02:00
|
|
|
# image: node:alpine
|
2023-08-14 10:32:22 +02:00
|
|
|
image: lauralani/netlify-cli:latest
|
2023-08-14 08:03:36 +02:00
|
|
|
pull: true
|
2023-08-08 09:03:06 +02:00
|
|
|
when:
|
|
|
|
- event: push
|
|
|
|
branch: main
|
|
|
|
secrets:
|
|
|
|
- NETLIFY_AUTH_TOKEN
|
|
|
|
- NETLIFY_SITE_ID
|
|
|
|
commands:
|
2023-08-14 08:03:36 +02:00
|
|
|
# - npm install netlify-cli -g
|
2023-08-08 09:03:06 +02:00
|
|
|
- netlify deploy --prod --dir ./public
|