Skip to content

ci: use ubuntu 24.04 for all jobs #235

ci: use ubuntu 24.04 for all jobs

ci: use ubuntu 24.04 for all jobs #235

Workflow file for this run

name: Lighthouse
on:
push:
branches:
- master
- lhci
jobs:
lhci:
name: Lighthouse CI
runs-on: ubuntu-24.04
steps:
- name: Main checkout (source)
uses: actions/checkout@v2
- name: Build Action
uses: ./.github/actions/build-site
with:
checkout-dir: .
cache-tag: lh-tag
- name: Patch site
run: |
# we patch the site to replace refereces to the public domain
# with localhost, since otherwise we'll get spurious warnings about
# bad canonical URLs
find _site -type f -name '*.html' -exec sed -i \
's|href="https://travisdowns.github.io|href="http://localhost|g' {} \;
- name: Generate lighthouse config
run: |
_scripts/lighthouse/update-lhci-config.py _site
- name: Run Lighthouse CI
id: lhci
uses: treosh/lighthouse-ci-action@v10
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
with:
configPath: lighthouserc.json
uploadArtifacts: true
temporaryPublicStorage: true
runs: 3
- name: Output summary
run: |
echo "::group::Write JSON files"
cat <<< '${{ steps.lhci.outputs.manifest }}' > manifest.json
cat <<< '${{ steps.lhci.outputs.links }}' > links.json
echo "::endgroup::"
echo "Lighthouse results:"
_scripts/lighthouse/print-summary.py manifest.json links.json
- name: Upload manifest
uses: actions/upload-artifact@v4
with:
name: JSON manifest
path: |
manifest.json
links.json