Skip to content

Commit

Permalink
docs: update GitHub Action deploy template
Browse files Browse the repository at this point in the history
  • Loading branch information
imfing authored Feb 20, 2024
1 parent 98546e6 commit 0e312d3
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions exampleSite/content/docs/guide/deploy-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,24 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.117.0
HUGO_VERSION: 0.121.2
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
fetch-depth: 0 # fetch all history for .GitInfo and .Lastmod
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.117.0'
extended: true
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
Expand All @@ -77,9 +80,9 @@ jobs:
run: |
hugo \
--gc --minify \
--baseURL "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/"
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: ./public

Expand All @@ -93,7 +96,7 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
```
{{% /details %}}
Expand Down

0 comments on commit 0e312d3

Please sign in to comment.