mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 20:17:17 +00:00
Fix a formatting error for Github Actions (#1323)
Fixed a formatting error for the yaml file and also changed all the versions to either `@latest` or just `latest`.
This commit is contained in:
1 parent
260106669e
commit
7a95e9db57
1 file changed
+8
-11
@@ -50,9 +50,10 @@ This is a much simpler setup as your Hugo files and generated content are publis
|
|||||||
|
|
||||||
GitHub execute your software development workflows. Everytime you push your code on the Github repository, Github Action will build the site automatically.
|
GitHub execute your software development workflows. Everytime you push your code on the Github repository, Github Action will build the site automatically.
|
||||||
|
|
||||||
Create a file in `.github/workflows/gh-pages.yml` containing the following content (based on https://github.com/marketplace/actions/hugo-setup):
|
Create a file in `.github/workflows/gh-pages.yml` containing the following content (based on https://github.com/marketplace/actions/hugo-setup ):
|
||||||
|
|
||||||
`
|
```
|
||||||
|
|
||||||
name: github pages
|
name: github pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -70,29 +71,25 @@ 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@latest
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.79.1'
|
hugo-version: 'latest'
|
||||||
# extended: true
|
# extended: true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --minify
|
run: hugo --minify
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@latest
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
`
|
|
||||||
|
|
||||||
Set hugo-version: `'latest'` to use the latest version of Hugo.
|
|
||||||
|
|
||||||
`
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@latest
|
||||||
with:
|
with:
|
||||||
hugo-version: 'latest'
|
hugo-version: 'latest'
|
||||||
`
|
```
|
||||||
|
|
||||||
For more advance settings https://github.com/marketplace/actions/hugo-setup
|
For more advance settings https://github.com/marketplace/actions/hugo-setup
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user