From 98bf750b72ae5f95908948f2475faea91f3cb81a Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 8 Nov 2023 13:19:33 +0100 Subject: [PATCH] Deploy to pages (modern version) --- .github/workflows/page-main.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/page-main.yml b/.github/workflows/page-main.yml index 78dbcc8..ef0915e 100644 --- a/.github/workflows/page-main.yml +++ b/.github/workflows/page-main.yml @@ -4,7 +4,16 @@ on: push: branches: - main - pull_request: + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false jobs: deploy: @@ -20,9 +29,11 @@ jobs: - name: Build run: hugo --minify - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/main' + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_site + path: '_site' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2