From 33304c1945479683145fca0bbd2e481724d71b5d Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sat, 10 Jun 2023 20:52:08 +0200 Subject: [PATCH] fix: Use router prefix to fix build for GitHub Pages --- .github/workflows/seo-report.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/seo-report.yaml b/.github/workflows/seo-report.yaml index bd05874..6de22eb 100644 --- a/.github/workflows/seo-report.yaml +++ b/.github/workflows/seo-report.yaml @@ -31,11 +31,7 @@ jobs: run: yarn global add @unlighthouse/cli puppeteer - 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);" + run: unlighthouse-ci --site "https://omnidash.io" --build-static --router-prefix ${{ github.event.repository.name }} - name: Upload GitHub Pages artifact uses: actions/upload-pages-artifact@v1.0.8