blog/.gitea/workflows/deploy.yml
Thanwer 53059c2db7
Some checks failed
Deploy / deploy (push) Failing after 5s
Update custom layouts for Hugo 0.123+ and bump Hugo to 0.151.0
site.Language.Locale and .Language.Label were removed from Hugo's
template API in 0.123 / 0.124. The theme already uses the new names;
only our overrides in layouts/ still referenced the old ones.

- layouts/_default/baseof.html: site.Language.Locale -> site.LanguageCode
- layouts/_default/sitemap.xml: .Language.Label -> .Language.LanguageCode
  (hreflang expects a BCP47 code, not a display name)
- layouts/partials/language-switcher.html: .Language.Label -> .Language.LanguageName
  (display name for the switcher UI)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 18:30:15 +02:00

31 lines
717 B
YAML

name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
env:
HUGO_VERSION: "0.151.0"
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: node:20-bookworm
volumes:
- /srv/www:/srv/www
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Hugo extended
run: |
curl -sL "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-arm64.tar.gz" | tar xz
install hugo /usr/local/bin/
- name: Build and deploy to /srv/www/blog
run: hugo --gc --minify --cleanDestinationDir --destination /srv/www/blog