mirror of
https://github.com/status-im/actions-gh-pages.git
synced 2025-02-04 17:24:25 +00:00
docs: Update Hugo workflow example
- Update Hugo workflow example (Install Hugo with downloading binary) - Remove `peaceiris/actions-hugo` from README Close #23
This commit is contained in:
parent
d3bd43b617
commit
201f9af234
31
README.md
31
README.md
@ -63,13 +63,8 @@ Next, Go to **Repository Settings**
|
||||
|
||||
#### :star: Repository type - Project
|
||||
|
||||
An example yaml file with Hugo action.
|
||||
An example workflow for Hugo.
|
||||
|
||||
- [peaceiris/actions-hugo: GitHub Actions for Hugo extended](https://github.com/peaceiris/actions-hugo)
|
||||
|
||||
[![peaceiris/actions-hugo - GitHub](https://gh-card.dev/repos/peaceiris/actions-hugo.svg?fullname)](https://github.com/peaceiris/actions-hugo)
|
||||
|
||||
![peaceiris/actions-hugo latest version](https://img.shields.io/github/release/peaceiris/actions-hugo.svg?label=peaceiris%2Factions-hugo)
|
||||
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
|
||||
|
||||
```yaml
|
||||
@ -86,12 +81,19 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: build
|
||||
uses: peaceiris/actions-hugo@v0.58.1
|
||||
with:
|
||||
args: --gc --minify --cleanDestinationDir
|
||||
- name: Install Hugo
|
||||
env:
|
||||
HUGO_VERSION: '0.58.2'
|
||||
run: |
|
||||
mkdir /tmp/hugo && cd /tmp/hugo
|
||||
curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-64bit.tar.gz | \
|
||||
tar -xz && \
|
||||
sudo mv ./hugo /usr/local/bin/
|
||||
|
||||
- name: deploy
|
||||
- name: Build
|
||||
run: hugo --gc --minify --cleanDestinationDir
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v2.3.0
|
||||
env:
|
||||
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
|
||||
|
||||
- [peaceiris/gh-pages - Docker Hub](https://hub.docker.com/r/peaceiris/gh-pages)
|
||||
|
||||
```diff
|
||||
- uses: peaceiris/actions-hugo@v0.58.1
|
||||
+ uses: docker://peaceiris/gha-hugo:v0.58.1
|
||||
```
|
||||
|
||||
- [peaceiris/gha-hugo - Docker Hub](https://hub.docker.com/r/peaceiris/gha-hugo)
|
||||
|
||||
#### :star: `PERSONAL_TOKEN`
|
||||
|
||||
[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`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user