From eef4772cb23e917744263cc26fdad598644daa16 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sat, 10 Jun 2023 18:30:50 +0200 Subject: [PATCH] refactor: Use native Github Actions --- .github/workflows/seo-report.yaml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/seo-report.yaml b/.github/workflows/seo-report.yaml index 9b7f240..5f2c21a 100644 --- a/.github/workflows/seo-report.yaml +++ b/.github/workflows/seo-report.yaml @@ -4,7 +4,7 @@ on: [deployment_status] jobs: - e2e: + build: if: github.event.deployment_status.state == 'success' runs-on: ubuntu-latest steps: @@ -22,10 +22,21 @@ jobs: - name: Build Unlighthouse report run: unlighthouse-ci --site ${{ github.event.deployment_status.target_url }} --build-static - - name: Deploy report to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v1.0.8 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: './.unlighthouse' - publish_branch: gh-pages - publish_dir_prefix: ${{ github.head_ref }} + path: './.unlighthouse' + + 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@v2