From c4cababe983c4da8cc33656f893ba98383dc5351 Mon Sep 17 00:00:00 2001 From: Dominik Agres Date: Mon, 22 Jun 2026 21:04:44 +0200 Subject: [PATCH] cleanup --- .githooks/pre-commit | 4 ++++ .github/dependabot.yml | 6 ++++++ .github/workflows/check.yml | 22 ++++++++++++++++++++++ .github/workflows/main.yml | 2 ++ blog/layouts/baseof.html | 3 +++ 5 files changed, 37 insertions(+) create mode 100755 .githooks/pre-commit create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/check.yml diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 0000000..1bfe681 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +# Same check as CI: abort the commit if Hugo can't build cleanly. +make build || exit 1 +make clean diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c75e875 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..220f8f1 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,22 @@ +name: Build Check + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: peaceiris/actions-hugo@v3 + with: + hugo-version: "0.152.2" + extended: true + + # Fails the run on any Hugo error (broken templates, shortcodes, refs). + - run: hugo --gc --minify --panicOnWarning + working-directory: blog diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f356810..0818204 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,6 +21,8 @@ jobs: key: ${{ secrets.VPS_SSH_KEY }} port: 22 script: | + set -e + # Pull latest changes cd /home/agres/website git pull origin main diff --git a/blog/layouts/baseof.html b/blog/layouts/baseof.html index c1d0a54..7c43b90 100644 --- a/blog/layouts/baseof.html +++ b/blog/layouts/baseof.html @@ -6,6 +6,9 @@ {{ .Site.Params.browserTitle }} :: {{ .Title }} {{ with .Description }}{{ end }} + + {{ range .AllTranslations }} + {{ end }}