Remove Lighthouse auditing workflow
This commit is contained in:
parent
1d0d621963
commit
1574cd8515
|
@ -5,96 +5,6 @@ on:
|
|||
pull_request:
|
||||
|
||||
jobs:
|
||||
lighthouse:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
with:
|
||||
hugo-version: latest
|
||||
extended: true
|
||||
|
||||
- name: Checkout (pull_request)
|
||||
if: github.event.pull_request
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.base.ref }}
|
||||
|
||||
- name: Checkout (push)
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.before }}
|
||||
|
||||
- name: Build previous commit
|
||||
run: |
|
||||
hugo --buildDrafts --printI18nWarnings --printPathWarnings --baseURL https://localhost -d old/
|
||||
|
||||
- name: Checkout current commit
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
clean: false
|
||||
|
||||
- name: Build current commit
|
||||
run: |
|
||||
hugo --buildDrafts --printI18nWarnings --printPathWarnings --baseURL https://localhost
|
||||
cp -r public/ new/
|
||||
# copy, so that public/ stays, it will be needed for Caddy to serve
|
||||
|
||||
- name: Save full diff
|
||||
run: diff -r old/ new/ | tee changes.diff || true
|
||||
|
||||
- name: Upload full diff
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: diff
|
||||
path: changes.diff
|
||||
|
||||
- name: Find changed URLs
|
||||
id: changed_urls
|
||||
env:
|
||||
SCHEME: https
|
||||
DOMAIN: localhost
|
||||
run: |
|
||||
urls="$(./changed-urls.sh)"
|
||||
echo "urls<<EOM" >> $GITHUB_OUTPUT
|
||||
echo "$urls" >> $GITHUB_OUTPUT
|
||||
echo "EOM" >> $GITHUB_OUTPUT
|
||||
echo -e "CHANGED:\n$urls"
|
||||
|
||||
- name: Install Caddy
|
||||
if: "${{ steps.changed_urls.outputs.urls != '' }}"
|
||||
run: |
|
||||
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
|
||||
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
|
||||
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
|
||||
sudo apt update
|
||||
sudo apt install caddy
|
||||
sudo systemctl disable --now caddy
|
||||
|
||||
- name: Compress
|
||||
if: "${{ steps.changed_urls.outputs.urls != '' }}"
|
||||
run: time ./compress.sh
|
||||
|
||||
- name: Audit using Lighthouse
|
||||
if: "${{ steps.changed_urls.outputs.urls != '' }}"
|
||||
uses: treosh/lighthouse-ci-action@v9
|
||||
with:
|
||||
uploadArtifacts: true
|
||||
configPath: ./lighthouserc.yaml
|
||||
runs: 3
|
||||
serverBaseUrl: https://lhci.bbaovanc.com/
|
||||
# this should be safe since it only allows adding (not deleting) data
|
||||
serverToken: 2fca0410-95ae-4ea9-8dc6-687ed7843a3a
|
||||
urls: ${{ steps.changed_urls.outputs.urls }}
|
||||
|
||||
|
||||
audit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
Loading…
Reference in New Issue