webpage/.woodpecker.yaml

45 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2024-11-26 22:25:09 +00:00
# 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
event: [push, pull_request]
# 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:
2024-11-26 22:38:04 +00:00
image: quay.io/thegeeklab/hugo:0.136
commands:
- hugo --minify --panicOnWarning
2024-11-26 22:25:09 +00:00
when:
event: [pull_request, push]
publish:
image: git.merp.digital/eranmorkon/woodpecker-scp:1.1.0
settings:
ssh_key:
2024-11-26 22:28:41 +00:00
from_secret: ssh_key
2024-11-26 22:25:09 +00:00
ssh_known_hosts:
from_secret: ssh_known_hosts
extra_flags: -r
source: public/*
destination: "root@static.keks.cloud:/var/www/gutes.team/"