Skip to content

Update GH pages workflow, bump Hugo #6

Update GH pages workflow, bump Hugo

Update GH pages workflow, bump Hugo #6

Workflow file for this run

# Based on https://github.com/marketplace/actions/hugo-setup
name: github pages
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-20.04
env:
HUGO_VERSION: 0.114.0
steps:
- uses: actions/checkout@v3
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@v2
with:
hugo-version: ${{ env.HUGO_VERSION }}
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: hugo --minify
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
deploy:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2