From d42570b4c41581ac0221bed76ed46bc8c567ffc7 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sat, 10 Jun 2023 20:38:41 +0200 Subject: [PATCH] fix: Change base path for `unlighthouse` build --- .github/workflows/seo-report.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/seo-report.yaml b/.github/workflows/seo-report.yaml index 7005cf4..bd05874 100644 --- a/.github/workflows/seo-report.yaml +++ b/.github/workflows/seo-report.yaml @@ -33,6 +33,10 @@ jobs: - name: Build Unlighthouse report run: unlighthouse-ci --site "https://omnidash.io" --build-static + - name: Add base href to `index.html` + run: | + node -e "const fs = require('fs'); const file = './.unlighthouse/index.html'; let html = fs.readFileSync(file, 'utf-8'); html = html.replace(/([\s\S]*?)<\/head>/, (match, headContent) => '' + headContent + ''); fs.writeFileSync(file, html);" + - name: Upload GitHub Pages artifact uses: actions/upload-pages-artifact@v1.0.8 with: