forked from drowl87/hextra_mirror
ci: use actions/configure-pages and bump hugo version
This commit is contained in:
parent
3503b4c4f1
commit
f98fa8c389
25
.github/workflows/pages.yml
vendored
25
.github/workflows/pages.yml
vendored
@ -31,21 +31,24 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
HUGO_VERSION: 0.117.0
|
HUGO_VERSION: 0.124.1
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
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
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.20'
|
go-version: '1.22'
|
||||||
|
- name: Setup Pages
|
||||||
|
id: pages
|
||||||
|
uses: actions/configure-pages@v4
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
run: |
|
||||||
with:
|
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
|
||||||
hugo-version: ${{ env.HUGO_VERSION }}
|
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
||||||
extended: true
|
|
||||||
- name: Build with Hugo
|
- name: Build with Hugo
|
||||||
env:
|
env:
|
||||||
# For maximum backward compatibility with Hugo modules
|
# For maximum backward compatibility with Hugo modules
|
||||||
@ -55,9 +58,9 @@ jobs:
|
|||||||
hugo \
|
hugo \
|
||||||
--minify \
|
--minify \
|
||||||
--themesDir=../.. --source=exampleSite \
|
--themesDir=../.. --source=exampleSite \
|
||||||
--baseURL "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/"
|
--baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v2
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: ./exampleSite/public
|
path: ./exampleSite/public
|
||||||
|
|
||||||
@ -71,4 +74,4 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v2
|
uses: actions/deploy-pages@v4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user