Skip to content

1st publication

1st publication #8

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: '1.24'
- name: Setup Hugo
run: |
set -euo pipefail
HUGO_VERSION=0.160.1
wget --no-verbose -O /tmp/hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz
tar -xzf /tmp/hugo.tar.gz -C /tmp
sudo mv /tmp/hugo /usr/local/bin/hugo
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Cache Hugo resources
uses: actions/cache@v5
with:
path: resources
key: hugo-resources-${{ hashFiles('assets/**') }}
restore-keys: hugo-resources-
- name: Build
run: hugo --minify
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: ./public
deploy:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v5