2024-02-28 10:03:52 +01:00
|
|
|
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
|
|
|
|
|
2024-02-28 10:05:34 +01:00
|
|
|
deploy-cloudflare-production:
|
2024-02-28 10:03:52 +01:00
|
|
|
image: node:alpine
|
|
|
|
# image: lauralani/netlify-cli:latest
|
|
|
|
pull: true
|
|
|
|
when:
|
|
|
|
- event: push
|
2024-02-28 10:05:34 +01:00
|
|
|
branch: main
|
2024-02-28 10:03:52 +01:00
|
|
|
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
|