multi-topic, publish from gh-pages branch
All checks were successful
Build and deploy static pages / build-and-push (push) Successful in 19s

This commit is contained in:
2026-08-17 18:10:49 +02:00
parent 1a9f822b56
commit d822cdaa6a
181 changed files with 1076 additions and 437 deletions

View File

@@ -0,0 +1,52 @@
name: Build and deploy static pages
on:
push:
branches: [main]
workflow_dispatch:
env:
HUGO_VERSION: "0.165.0"
# Public URL served by the gitea-pages proxy. Override with a repo variable
# (Settings → Actions → Variables → SITE_BASE_URL) if the site moves.
SITE_BASE_URL: ${{ vars.SITE_BASE_URL || format('https://pub.sqrt.fr/{0}/', github.repository) }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
# site/themes/PaperMod is a submodule
submodules: recursive
- name: Install Hugo
run: |
mkdir -p "$HOME/.local/bin"
curl -sSfL "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" \
| tar -xz -C "$HOME/.local/bin" hugo
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
"$HOME/.local/bin/hugo" version
- name: Install site JS dependencies
# site/assets/js/calendar.js imports @fullcalendar/* — Hugo's js.Build
# resolves those from site/node_modules at build time.
working-directory: site
run: npm ci
- name: Build site
# Content under site/content/ is generated by ./build.sh and committed,
# so CI only renders it — no data fetching happens here.
run: hugo --source site --minify --gc --baseURL "$SITE_BASE_URL"
- name: Deploy site
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
publish_branch: gh-pages
publish_dir: ./site/public