Skip to content

Commit 201f9af

Browse files
committed
docs: Update Hugo workflow example
- Update Hugo workflow example (Install Hugo with downloading binary) - Remove `peaceiris/actions-hugo` from README Close #23
1 parent d3bd43b commit 201f9af

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

README.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,8 @@ Next, Go to **Repository Settings**
6363

6464
#### :star: Repository type - Project
6565

66-
An example yaml file with Hugo action.
66+
An example workflow for Hugo.
6767

68-
- [peaceiris/actions-hugo: GitHub Actions for Hugo extended](https://github.com/peaceiris/actions-hugo)
69-
70-
[![peaceiris/actions-hugo - GitHub](https://gh-card.dev/repos/peaceiris/actions-hugo.svg?fullname)](https://github.com/peaceiris/actions-hugo)
71-
72-
![peaceiris/actions-hugo latest version](https://img.shields.io/github/release/peaceiris/actions-hugo.svg?label=peaceiris%2Factions-hugo)
7368
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
7469

7570
```yaml
@@ -86,12 +81,19 @@ jobs:
8681
steps:
8782
- uses: actions/checkout@master
8883

89-
- name: build
90-
uses: peaceiris/[email protected]
91-
with:
92-
args: --gc --minify --cleanDestinationDir
84+
- name: Install Hugo
85+
env:
86+
HUGO_VERSION: '0.58.2'
87+
run: |
88+
mkdir /tmp/hugo && cd /tmp/hugo
89+
curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-64bit.tar.gz | \
90+
tar -xz && \
91+
sudo mv ./hugo /usr/local/bin/
9392
94-
- name: deploy
93+
- name: Build
94+
run: hugo --gc --minify --cleanDestinationDir
95+
96+
- name: Deploy
9597
uses: peaceiris/[email protected]
9698
env:
9799
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
@@ -132,13 +134,6 @@ By pulling docker images, you can reduce the overall execution time of your work
132134

133135
- [peaceiris/gh-pages - Docker Hub](https://hub.docker.com/r/peaceiris/gh-pages)
134136

135-
```diff
136-
- uses: peaceiris/[email protected]
137-
+ uses: docker://peaceiris/gha-hugo:v0.58.1
138-
```
139-
140-
- [peaceiris/gha-hugo - Docker Hub](https://hub.docker.com/r/peaceiris/gha-hugo)
141-
142137
#### :star: `PERSONAL_TOKEN`
143138

144139
[Generate a personal access token (`repo`)](https://github.com/settings/tokens) and add it to Secrets as `PERSONAL_TOKEN`, it works as well as `ACTIONS_DEPLOY_KEY`.

0 commit comments

Comments
 (0)