44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
name: Lighthouse CI
|
|
|
|
# GitHub mirror of .gitea/workflows/lighthouse.yml. Audits the deployed
|
|
# staging site (https://boiler.saas-ctrl.com) nightly + on manual dispatch.
|
|
# See the Gitea variant and docs/architecture/lighthouse.md for the rationale
|
|
# behind auditing a deployed environment rather than a CI-local server.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# 03:00 UTC nightly — after the day's deploys have settled.
|
|
- cron: "0 3 * * *"
|
|
|
|
jobs:
|
|
lighthouse:
|
|
name: Run Lighthouse audits
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Mint Lighthouse session cookie
|
|
run: node scripts/rotate-lighthouse-session-cookie.mjs
|
|
env:
|
|
LIGHTHOUSE_LOGIN_URL: https://boiler.saas-ctrl.com/login
|
|
LIGHTHOUSE_LOGIN_EMAIL: ${{ secrets.LIGHTHOUSE_LOGIN_EMAIL }}
|
|
LIGHTHOUSE_LOGIN_PASSWORD: ${{ secrets.LIGHTHOUSE_LOGIN_PASSWORD }}
|
|
LIGHTHOUSE_SESSION_COOKIE: ${{ secrets.LIGHTHOUSE_SESSION_COOKIE }}
|
|
LIGHTHOUSE_SESSION_COOKIE_NAME: RJ_session
|
|
LIGHTHOUSE_COOKIE_DOMAIN: boiler.saas-ctrl.com
|
|
|
|
- name: Run Lighthouse-CI against staging
|
|
# ubuntu-latest ships Chrome pre-installed; no browser setup needed.
|
|
run: npx --yes @lhci/cli@0.13.x autorun --config=./.lighthouserc.staging.json
|
|
|
|
- name: Upload Lighthouse artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: lighthouse-ci-results
|
|
path: .lighthouseci/
|
|
retention-days: 14
|