website/.woodpecker/deploy.yml
lauralani cb4301a04b
Some checks failed
ci/woodpecker/push/deploy Pipeline failed
upcate ci
2023-12-18 19:02:45 +01:00

49 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.21-bookworm
environment:
- HUGO_VERSION=0.120.4
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
- cd public
- netlify deploy --prod