From ce0282669cbe018220f38cbc3e37d1217d4bab1c Mon Sep 17 00:00:00 2001 From: Alex Kagno <> Date: Wed, 13 Nov 2024 08:12:53 -0700 Subject: [PATCH] update workflow to be better --- .github/workflows/hugo.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 80339c9..f86d02f 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -7,7 +7,7 @@ on: pull_request: jobs: - deploy: + build: permissions: contents: write runs-on: ubuntu-22.04 @@ -22,15 +22,29 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v3 with: - hugo-version: "0.119.0" + hugo-version: "0.138.0" extended: true - name: Build run: hugo --minify - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/main' + - name: Upload Public + uses: actions/upload-artifact@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public + name: public + path: ./public/* + if-no-files-found: error + include-hidden-files: true + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file