From 191c350a8899c05b6809cc0d5b79453802ea1f30 Mon Sep 17 00:00:00 2001 From: Xin Date: Tue, 6 Feb 2024 16:43:58 -0500 Subject: [PATCH] ci: bump versions and enhance compatibility (#9) --- .github/workflows/pages.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml index ccb38f7..5cdf4fe 100644 --- a/.github/workflows/pages.yaml +++ b/.github/workflows/pages.yaml @@ -4,7 +4,7 @@ name: Deploy Hugo site to Pages on: # Runs on pushes targeting the default branch push: - branches: ["main"] + branches: [$default-branch] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -31,12 +31,13 @@ jobs: build: runs-on: ubuntu-latest env: - HUGO_VERSION: 0.121.1 + 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 with: @@ -45,10 +46,9 @@ jobs: id: pages uses: actions/configure-pages@v4 - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: ${{ env.HUGO_VERSION }} - 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 @@ -59,7 +59,7 @@ jobs: --gc --minify \ --baseURL "${{ steps.pages.outputs.base_url }}/" - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: ./public @@ -73,4 +73,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4