mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2025-06-18 01:55:29 +08:00
Compare commits
4 Commits
b5ca8e098c
...
eeec9050cc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
eeec9050cc | ||
![]() |
00e5abe1c8 | ||
![]() |
0788e01ecf | ||
![]() |
0f86eba495 |
20
README.md
20
README.md
@ -91,7 +91,7 @@ jobs:
|
|||||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.119.0'
|
hugo-version: '0.119.0'
|
||||||
# extended: true
|
# extended: true
|
||||||
@ -121,7 +121,7 @@ Set `extended: true` to use a Hugo extended version.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.119.0'
|
hugo-version: '0.119.0'
|
||||||
extended: true
|
extended: true
|
||||||
@ -133,7 +133,7 @@ Set `hugo-version: 'latest'` to use the latest version of Hugo.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: 'latest'
|
hugo-version: 'latest'
|
||||||
```
|
```
|
||||||
@ -154,9 +154,15 @@ Insert a cache step before site-building as follows.
|
|||||||
Note that with latest hugo version, the [cache dir location](https://gohugo.io/getting-started/configuration/#configure-cachedir) on a Linux-based operating system is `${HOME}/.cache`. On macOS, `${HOME}/Library/Caches` has the location.
|
Note that with latest hugo version, the [cache dir location](https://gohugo.io/getting-started/configuration/#configure-cachedir) on a Linux-based operating system is `${HOME}/.cache`. On macOS, `${HOME}/Library/Caches` has the location.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: 'stable'
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: /home/runner/.cache/hugo_cache # <-- with hugo version v0.116.0 and above
|
path: /home/runner/.cache/hugo_cache # <-- with hugo version v0.116.0 and above
|
||||||
|
# path: /tmp/hugo_cache_runner # <-- with hugo version v0.116.0 and above, and without actions/setup-go step.
|
||||||
# path: /tmp/hugo_cache # <-- with hugo version < v0.116.0
|
# path: /tmp/hugo_cache # <-- with hugo version < v0.116.0
|
||||||
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
@ -190,7 +196,7 @@ Next, add a step to read a Hugo version from the `.env` file.
|
|||||||
echo "HUGO_VERSION=${HUGO_VERSION}" >> "${GITHUB_OUTPUT}"
|
echo "HUGO_VERSION=${HUGO_VERSION}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: '${{ steps.hugo-version.outputs.HUGO_VERSION }}'
|
hugo-version: '${{ steps.hugo-version.outputs.HUGO_VERSION }}'
|
||||||
extended: true
|
extended: true
|
||||||
@ -256,7 +262,7 @@ jobs:
|
|||||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.119.0'
|
hugo-version: '0.119.0'
|
||||||
extended: true
|
extended: true
|
||||||
@ -310,7 +316,7 @@ jobs:
|
|||||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.119.0'
|
hugo-version: '0.119.0'
|
||||||
extended: true
|
extended: true
|
||||||
@ -364,7 +370,7 @@ jobs:
|
|||||||
run: git config core.quotePath false
|
run: git config core.quotePath false
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.119.0'
|
hugo-version: '0.119.0'
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user