Skip to content

update v4.0 releasenote #17

update v4.0 releasenote

update v4.0 releasenote #17

Workflow file for this run

# Build Hugo site and push to page branch
name: Build Hugo Site
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
permissions:
contents: write
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.154.1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install npm dependencies
run: npm ci --prefer-offline --no-audit
- name: Setup Hugo
run: |
wget -q -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: hugo --gc --minify
- name: Deploy to page branch
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: page
publish_dir: ./public
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'deploy: ${{ github.sha }}'