From 984000efe86018aa3ee320b1b7137515b58f9605 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 13 Mar 2024 15:56:20 -0500 Subject: [PATCH] Enable GH pages publishing again --- .github/workflows/bunnycdn.yml | 4 ++-- .github/workflows/github_pages.yml | 28 +++++++++++----------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/workflows/bunnycdn.yml b/.github/workflows/bunnycdn.yml index 8f36d3988..4aadd2634 100644 --- a/.github/workflows/bunnycdn.yml +++ b/.github/workflows/bunnycdn.yml @@ -1,8 +1,8 @@ name: Deploy to BunnyCDN on: - push: - branches: ["main"] + # push: + # branches: ["main"] workflow_dispatch: concurrency: diff --git a/.github/workflows/github_pages.yml b/.github/workflows/github_pages.yml index 8d77e096a..c13bff679 100644 --- a/.github/workflows/github_pages.yml +++ b/.github/workflows/github_pages.yml @@ -1,11 +1,8 @@ name: Deploy to GitHub Pages on: - # Runs on pushes targeting the default branch - # push: - # branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab + push: + branches: ["main"] workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages @@ -29,14 +26,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: 'latest' - extended: true - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + uses: actions/checkout@v4 with: submodules: recursive @@ -44,15 +35,18 @@ jobs: id: pages uses: actions/configure-pages@v4 + - name: Setup Hugo + run: | + LATEST_HUGO_VERSION=$(grep github.com/gohugoio/hugo go.mod | awk '{print $NF}' | sed 's/^v//') + HUGO_DOWNLOAD_URL="https://github.com/gohugoio/hugo/releases/download/v${LATEST_HUGO_VERSION}/hugo_extended_${LATEST_HUGO_VERSION}_linux-amd64.tar.gz" + curl -sL --retry 5 "$HUGO_DOWNLOAD_URL" | tar xvzf - hugo + ./hugo version + - name: Build with Hugo env: - # For maximum backward compatibility with Hugo modules HUGO_ENVIRONMENT: production HUGO_ENV: production - run: | - hugo \ - --minify \ - --baseURL https://major.io + run: ./hugo --minify --gc --baseURL https://major.io - name: Fix RSS feed run: |