This commit is contained in:
parent
7cd441a876
commit
50ca1bfda9
1 changed files with 15 additions and 10 deletions
|
|
@ -3,22 +3,27 @@ name: Build Hugo Site
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main # or master, depending on your main branch's name
|
- main # Adjust if your main branch has a different name
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main # Enables the action on pull requests to the main branch
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest # Specifies the runner environment
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2 # Checks out a copy of your repository
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Hugo
|
- name: Set up Go
|
||||||
uses: peaceiris/actions-hugo@v2 # This action sets up Hugo
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.92.0' # Specify the Hugo version you need
|
go-version: '1.18' # Specify the version of Go you need, align it with your project requirements
|
||||||
|
|
||||||
- name: Build Hugo site
|
- name: Set up Hugo
|
||||||
run: hugo --minify # Commands to build your Hugo site
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: '0.92.0' # Specify the Hugo version you need
|
||||||
|
|
||||||
|
- name: Build Hugo site
|
||||||
|
run: hugo --minify
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue