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/.gitignore b/.gitignore index ba845a0..3bb444d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# Private Google Datei -googleeb4005177cc2703c.html - # public folder public/ 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 @@