diff --git a/entrypoint.sh b/entrypoint.sh index 855ac64..869f375 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -167,6 +167,7 @@ query_string="?_fd=0&pb=0" min_score_performance="${LHCI_MIN_SCORE_PERFORMANCE:-0.6}" min_score_accessibility="${LHCI_MIN_SCORE_ACCESSIBILITY:-0.9}" +# Prepare the default CI Lighthouse config cat <<- EOF > lighthouserc.yml ci: collect: @@ -195,6 +196,11 @@ ci: aggregationMethod: median-run EOF +# Merge custom Lighthouse CI config, if provided +if [[ -f ".github/lighthouserc-custom.yml" ]]; then + yq eval-all 'select(fileIndex == 0) * select(fileIndex == 1)' lighthouserc.yml .github/lighthouserc-custom.yml -i +fi + cat <<-EOF > setPreviewCookies.js module.exports = async (browser) => { // launch browser for LHCI