mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 00:33:39 +00:00
Update workflow
This commit is contained in:
18
.github/workflows/publish.yml
vendored
18
.github/workflows/publish.yml
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user