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] [deployment_status]
jobs: jobs:
e2e: build:
if: github.event.deployment_status.state == 'success' if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -22,10 +22,21 @@ jobs:
- name: Build Unlighthouse report - name: Build Unlighthouse report
run: unlighthouse-ci --site ${{ github.event.deployment_status.target_url }} --build-static run: unlighthouse-ci --site ${{ github.event.deployment_status.target_url }} --build-static
- name: Deploy report to GitHub Pages - name: Upload GitHub Pages artifact
uses: peaceiris/actions-gh-pages@v3 uses: actions/upload-pages-artifact@v1.0.8
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} path: './.unlighthouse'
publish_dir: './.unlighthouse'
publish_branch: gh-pages deploy:
publish_dir_prefix: ${{ github.head_ref }} 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