Skip to content

build: Bump step-security/harden-runner from 2.19.1 to 2.19.3 #1510

build: Bump step-security/harden-runner from 2.19.1 to 2.19.3

build: Bump step-security/harden-runner from 2.19.1 to 2.19.3 #1510

# Workflow for building and deploying a Hugo site to GitHub Pages
name: Hugo Build PR Check
on:
pull_request:
branches:
- main
- dev-tools
paths:
- "docs/**"
- "azure-resources/**"
- "azure-specialized-workloads/**"
- "azure-waf/**"
- ".github/workflows/hugo-build-pr-check.yml"
workflow_dispatch: {}
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
# Default to bash
defaults:
run:
shell: bash
jobs:
buildpr:
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.124.1
steps:
- name: Harden Runner
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
with:
egress-policy: audit
- name: Install Hugo CLI
run: |
wget -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: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
working-directory: .