website/.woodpecker/deploy.yml
lauralani 4c8503eba0
Some checks failed
ci/woodpecker/push/deploy Pipeline failed
update CI
2023-08-08 09:27:53 +02:00

48 lines
No EOL
1.4 KiB
YAML

# hugo.yml
#
# Takes a repository with Hugo source, generates the static site and
# pushes the result to Codeberg pages
#
# Needs a codeberg access token (codeberg_token) as a secret in Woodpecker config
# Also uses another secret (mail) with email address for git config
#
# .domains file in the repository is copied to the output branch so custom domains work
#
# The HUGO_OUTPUT variable must be set to the build output folder configured in Hugo
#
# Exclude page pipeline to be run on "pages" branch
when:
branch:
exclude: pages
# Recursive cloning is used to fully clone the themes given as Git submodules
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
steps:
# Build hugo static files
build:
image: golang:1.20-bookworm
environment:
- HUGO_VERSION=0.117.0
when:
event: push
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
netlify-deploy:
image: node:alpine
when:
event: push
secrets:
- NETLIFY_AUTH_TOKEN
- NETLIFY_SITE_ID
commands:
- npm install netlify-cli -g
- netlify deploy --prod --dir ./hugo_public