Skip to content

Migrate to Hugo #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ci: add a GitHub workflow to deploy the site
This finishes the transition to a Hugo-backed site.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Mar 8, 2025
commit 40f513ae7f392466e8db319a2df370b588a4118a
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy to Pages

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: configure Hugo
run: |
set -x &&
echo "HUGO_VERSION=$(sed -n 's/^ *hugo_version: *//p' <hugo.yml)" >>$GITHUB_ENV
- name: install Hugo ${{ env.HUGO_VERSION }}
run: |
set -x &&
deb=hugo_extended_${HUGO_VERSION}_linux-amd64.deb &&
curl -LO https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/$deb &&
sudo dpkg -i $deb
- uses: actions/configure-pages@v5
id: pages
- name: run Hugo to build the pages
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
HUGO_RELATIVEURLS: false
run: hugo config && hugo --minify --baseURL '${{ steps.pages.outputs.base_url }}/'
- uses: actions/upload-pages-artifact@v3
with:
path: ./public
- uses: actions/deploy-pages@v4
id: deployment