Skip to content

updated to newest Hugo version #219

updated to newest Hugo version

updated to newest Hugo version #219

Workflow file for this run

name: github pages
env:
WC_HUGO_VERSION: '0.147.9'
on:
push:
branches:
- src # Set a branch name to trigger deployment
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
# Provide permission to clone the repo and deploy it to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
#submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ${{ env.WC_HUGO_VERSION }}
extended: true
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: master
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# # Fetch history for Hugo's .GitInfo and .Lastmod
# fetch-depth: 0
# - name: Setup Hugo
# uses: peaceiris/actions-hugo@v3
# with:
# hugo-version: ${{ env.WC_HUGO_VERSION }}
# extended: true
# - uses: actions/cache@v4
# with:
# path: /tmp/hugo_cache_runner/
# key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }}
# restore-keys: |
# ${{ runner.os }}-hugomod-
# - name: Setup Pages
# id: pages
# uses: actions/configure-pages@v5
# - name: Build with Hugo
# env:
# HUGO_ENVIRONMENT: production
# run: |
# echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
# hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v3
# with:
# path: ./public
#
# # Deploy website to GitHub Pages hosting
# deploy:
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_branch: master