Update workflow

This commit is contained in:
Dave Gallant
2024-01-02 14:38:13 -05:00
parent 92b0f948be
commit 3b8e125d80
2 changed files with 10 additions and 13 deletions

View File

@@ -4,8 +4,6 @@ on:
push:
branches:
- main
paths-ignore:
- templates/**
jobs:
publish:
@@ -23,21 +21,23 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
# The action defaults to search for the dependency file (package-lock.json,
# npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its
# hash as a part of the cache key.
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
cache-dependency-path: "**/package-lock.json"
- name: Install Hugo
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.121.1"
extended: true
- name: Install npm Packages
run: npm ci
- name: Build Hugo
run: hugo --minify
- run: npm ci
- run: hugo --minify
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public