@@ -63,13 +63,8 @@ Next, Go to **Repository Settings**
63
63
64
64
#### :star : Repository type - Project
65
65
66
- An example yaml file with Hugo action .
66
+ An example workflow for Hugo.
67
67
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 )
73
68
![ peaceiris/actions-gh-pages latest version] ( https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages )
74
69
75
70
``` yaml
@@ -86,12 +81,19 @@ jobs:
86
81
steps :
87
82
- uses : actions/checkout@master
88
83
89
- - name : build
90
-
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/
93
92
94
- - name : deploy
93
+ - name : Build
94
+ run : hugo --gc --minify --cleanDestinationDir
95
+
96
+ - name : Deploy
95
97
96
98
env :
97
99
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
132
134
133
135
- [peaceiris/gh-pages - Docker Hub](https://hub.docker.com/r/peaceiris/gh-pages)
134
136
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
-
142
137
# ### :star: `PERSONAL_TOKEN`
143
138
144
139
[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