From 7005cc7f352c02919ed50cb4b7d800e323eeaa2e Mon Sep 17 00:00:00 2001 From: Hiroya Fujinami Date: Wed, 21 Aug 2024 14:53:08 +0900 Subject: [PATCH] Update deploy workflow (#87) Fix #86 --- .github/workflows/docs.yml | 29 +++++++++++++++++++++-------- .gitignore | 2 ++ .gitmodules | 5 +++-- docs/themes/hugo-whisper-theme | 2 +- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 216cef18..6c020fe1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,7 +5,7 @@ on: branches: [main] jobs: - deploy: + build: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory @@ -15,13 +15,26 @@ jobs: - name: Set up Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.63.2' + hugo-version: '0.133.0' extended: true - name: Build docs run: make docs - - name: Deploy - uses: docker://peaceiris/gh-pages:v2 - env: - ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./docs/public + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./docs/public + + deploy: + needs: build + name: Deploy to GitHub Pages + 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 diff --git a/.gitignore b/.gitignore index 3f9d989d..34748657 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ bin # Go workspace file go.work + +docs/.hugo_* diff --git a/.gitmodules b/.gitmodules index 29ce44a6..20efd0d9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ -[submodule "docs/themes/hugo-whisper-theme"] +[submodule "hugo-whisper-theme"] path = docs/themes/hugo-whisper-theme - url = https://github.com/jugglerx/hugo-whisper-theme.git + url = https://github.com/deining/hugo-whisper-theme.git + branch = deprecation-warning diff --git a/docs/themes/hugo-whisper-theme b/docs/themes/hugo-whisper-theme index 39939796..8c982a74 160000 --- a/docs/themes/hugo-whisper-theme +++ b/docs/themes/hugo-whisper-theme @@ -1 +1 @@ -Subproject commit 399397966bef75c48c818f1b24fa3ca1c6560ac3 +Subproject commit 8c982a7455d544881d3bea6e137a6b574b9cb176