mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 08:43:40 +00:00
Simplify workflow
This commit is contained in:
46
.github/workflows/publish.yml
vendored
46
.github/workflows/publish.yml
vendored
@@ -7,52 +7,9 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- templates/**
|
- templates/**
|
||||||
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["Update Projects Page"]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_hugo_npm_dependencies:
|
|
||||||
name: Update Hugo npm Dependencies
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
outputs:
|
|
||||||
commit_hash: ${{ steps.commit_changes.outputs.commit_hash }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "18"
|
|
||||||
|
|
||||||
- name: Install Hugo
|
|
||||||
uses: peaceiris/actions-hugo@v2
|
|
||||||
with:
|
|
||||||
hugo-version: "0.111.3"
|
|
||||||
extended: true
|
|
||||||
|
|
||||||
- name: Write composite package.json
|
|
||||||
run: hugo mod npm pack
|
|
||||||
|
|
||||||
- name: Install npm Packages
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Display Changes
|
|
||||||
run: git status
|
|
||||||
|
|
||||||
- name: Commit Changes
|
|
||||||
id: commit_changes
|
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
|
||||||
with:
|
|
||||||
commit_message: Update Hugo npm Dependencies
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Publish Hugo Site
|
name: Publish Hugo Site
|
||||||
needs: update_hugo_npm_dependencies
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -61,7 +18,6 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ needs.update_hugo_npm_dependencies.outputs.commit_hash }}
|
|
||||||
|
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -71,7 +27,7 @@ jobs:
|
|||||||
- name: Install Hugo
|
- name: Install Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: "0.111.3"
|
hugo-version: "0.121.1"
|
||||||
extended: true
|
extended: true
|
||||||
|
|
||||||
- name: Install npm Packages
|
- name: Install npm Packages
|
||||||
|
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
|||||||
module davegallant.github.io
|
module davegallant.github.io
|
||||||
|
|
||||||
go 1.21.5
|
go 1.21
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/davegallant/hugo-theme-gruvbox v0.0.0-20240102155230-cac2894e8557 // indirect
|
github.com/davegallant/hugo-theme-gruvbox v0.0.0-20240102155230-cac2894e8557 // indirect
|
||||||
|
Reference in New Issue
Block a user