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