From 2f4ddcc67c6942cc360e2b02b7dd13e945ebd972 Mon Sep 17 00:00:00 2001 From: kekskurse Date: Mon, 29 Jul 2024 00:44:51 +0200 Subject: [PATCH] ci --- .woodpecker.yaml | 44 ++++++++++++++++++++++++++++++++++++++++++++ hugo.toml | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .woodpecker.yaml diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..e960607 --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,44 @@ +# 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: + image: klakegg/hugo:ext-ubuntu-ci + commands: + - hugo --minify + when: + event: [pull_request, push] + publish: + image: git.merp.digital/eranmorkon/woodpecker-scp:1.1.0 + settings: + ssh_key: + from_secret: sshkey + ssh_known_hosts: + from_secret: ssh_known_hosts + extra_flags: -r + source: public/* + destination: "root@static.keks.cloud:/var/www/kekskurse.de/" diff --git a/hugo.toml b/hugo.toml index 8d448ad..adb391b 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,4 +1,4 @@ -baseURL = 'https://kekskurse.io' +baseURL = 'https://kekskurse.de' languageCode = 'en-us' title = 'kekskurse.de' theme = 'nostyleplease'