feat(ci): add automated Lighthouse audit pipeline
This commit is contained in:
@@ -3,6 +3,7 @@ services:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
- NODE_VERSION=${NODE_VERSION}
|
||||
- CADDY_VERSION=${CADDY_VERSION}
|
||||
image: portfolio:${PORTFOLIO_VERSION}
|
||||
container_name: portfolio
|
||||
@@ -10,6 +11,26 @@ services:
|
||||
networks:
|
||||
- reverse-proxy
|
||||
|
||||
lighthouse-audit:
|
||||
profiles:
|
||||
- audit
|
||||
image: zenika/alpine-chrome:${ZENIKA_VERSION}
|
||||
container_name: lighthouse-audit
|
||||
user: "0:0"
|
||||
volumes:
|
||||
- audit_dist:/app/dist
|
||||
- audit_reports:/app/.lighthouseci
|
||||
- npm_cache:/root/.npm
|
||||
environment:
|
||||
- CHROME_PATH=/usr/bin/chromium-browser
|
||||
working_dir: /app
|
||||
command: npx --prefer-offline @lhci/cli@${LHCI_VERSION} autorun --config=/app/dist/audit-config.cjs
|
||||
|
||||
volumes:
|
||||
audit_dist:
|
||||
audit_reports:
|
||||
npm_cache:
|
||||
|
||||
networks:
|
||||
reverse-proxy:
|
||||
external: true
|
||||
Reference in New Issue
Block a user