mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-25 12:22:17 +01:00
docs: Update README
This commit is contained in:
47
README.md
47
README.md
@@ -1,10 +1,9 @@
|
|||||||
[](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
|
[](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases)
|
[](https://github.com/peaceiris/actions-hugo/releases)
|
||||||
[](https://github.com/peaceiris/actions-hugo/actions)
|
[](https://github.com/peaceiris/actions-hugo/actions)
|
||||||
[](https://hub.docker.com/r/peaceiris/gha-hugo)
|
|
||||||
|
|
||||||
<img width="400" alt="GitHub Actions for Hugo extended" src="./images/ogp.svg">
|
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@
|
|||||||
|
|
||||||
### Create `.github/workflows/gh-pages.yml`
|
### Create `.github/workflows/gh-pages.yml`
|
||||||
|
|
||||||
An example with [GitHub Actions for deploying to GitHub Pages with Static Site Generators]
|
An example workflow with [GitHub Actions for deploying to GitHub Pages with Static Site Generators]
|
||||||
|
|
||||||
[GitHub Actions for deploying to GitHub Pages with Static Site Generators]: https://github.com/peaceiris/actions-gh-pages
|
[GitHub Actions for deploying to GitHub Pages with Static Site Generators]: https://github.com/peaceiris/actions-gh-pages
|
||||||
|
|
||||||
@@ -41,13 +40,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
- name: build
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v0.58.2
|
uses: peaceiris/actions-hugo@v2.0.0
|
||||||
with:
|
with:
|
||||||
args: --gc --minify --cleanDestinationDir
|
hugo-version: '0.58.2'
|
||||||
|
|
||||||
- name: deploy
|
- name: Build
|
||||||
uses: peaceiris/actions-gh-pages@v2.2.0
|
run: hugo --gc --minify --cleanDestinationDir
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v2.3.1
|
||||||
env:
|
env:
|
||||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
PUBLISH_BRANCH: gh-pages
|
PUBLISH_BRANCH: gh-pages
|
||||||
@@ -56,6 +58,33 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
### Hugo extended
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2.0.0
|
||||||
|
with:
|
||||||
|
hugo-version: '0.58.2'
|
||||||
|
extended: true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Latest version of Hugo
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2.0.0
|
||||||
|
with:
|
||||||
|
hugo-version: 'latest'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note**: This action gets a Hugo latest version by GitHub API. Please be aware of [GitHub API Rate limiting]
|
||||||
|
|
||||||
|
[GitHub API Rate limiting]: https://developer.github.com/v3/#rate-limiting
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
- [MIT License - peaceiris/actions-hugo]
|
- [MIT License - peaceiris/actions-hugo]
|
||||||
|
|||||||
Reference in New Issue
Block a user