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