refactor: Use native Github Actions

This commit is contained in:
Bart van der Braak 2023-06-10 18:30:50 +02:00
parent f513fbe44a
commit eef4772cb2

View file

@ -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