Skip to content

Bump peaceiris/actions-hugo from 2 to 3 #107

Bump peaceiris/actions-hugo from 2 to 3

Bump peaceiris/actions-hugo from 2 to 3 #107

Workflow file for this run

name: Deploy Hugo site to Pages
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive # 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: 'latest'
extended: true
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build
run: hugo --gc --minify --baseURL ${{ steps.pages.outputs.base_url }}
- name: Upload page artifact
if: ${{ github.ref == 'refs/heads/main'}}
uses: actions/upload-pages-artifact@v3
with:
path: ./public
# Deployment job
deploy:
needs: build
if: ${{ github.ref == 'refs/heads/main' }}
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
actions: read # to download an artifact uploaded by `actions/upload-pages-artifact@v3`
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4