Merge pull request #1 from ianferguson/ianferguson/hugo #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
HUGO_VERSION: 0.81.0 | |
steps: | |
- 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-64bit.deb \ | |
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | |
- name: Install Dart Sass | |
run: sudo snap install dart-sass | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# - name: Install Node.js dependencies | |
# run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" | |
- name: Build with Hugo | |
env: | |
HUGO_ENVIRONMENT: production | |
HUGO_ENV: production | |
run: | | |
hugo \ | |
--minify \ | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: hugo-site | |
path: ./public | |