mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-04-27 23:41:21 +00:00
fix: Use router prefix to fix build for GitHub Pages
This commit is contained in:
parent
fc6e7392a9
commit
33304c1945
1 changed files with 1 additions and 5 deletions
6
.github/workflows/seo-report.yaml
vendored
6
.github/workflows/seo-report.yaml
vendored
|
@ -31,11 +31,7 @@ jobs:
|
||||||
run: yarn global add @unlighthouse/cli puppeteer
|
run: yarn global add @unlighthouse/cli puppeteer
|
||||||
|
|
||||||
- name: Build Unlighthouse report
|
- name: Build Unlighthouse report
|
||||||
run: unlighthouse-ci --site "https://omnidash.io" --build-static
|
run: unlighthouse-ci --site "https://omnidash.io" --build-static --router-prefix ${{ github.event.repository.name }}
|
||||||
|
|
||||||
- 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(/<head>([\s\S]*?)<\/head>/, (match, headContent) => '<head>' + headContent + '<base href=\"/${{ github.event.repository.name }}/\"></head>'); fs.writeFileSync(file, html);"
|
|
||||||
|
|
||||||
- name: Upload GitHub Pages artifact
|
- name: Upload GitHub Pages artifact
|
||||||
uses: actions/upload-pages-artifact@v1.0.8
|
uses: actions/upload-pages-artifact@v1.0.8
|
||||||
|
|
Loading…
Reference in a new issue