mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-04-27 15:31:21 +00:00
fix: Change base path for unlighthouse
build
This commit is contained in:
parent
106b07a8ad
commit
d42570b4c4
1 changed files with 4 additions and 0 deletions
4
.github/workflows/seo-report.yaml
vendored
4
.github/workflows/seo-report.yaml
vendored
|
@ -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(/<head>([\s\S]*?)<\/head>/, (match, headContent) => '<head>' + headContent + '<base href=\"/${{ github.event.repository.name }}/\"></head>'); fs.writeFileSync(file, html);"
|
||||
|
||||
- name: Upload GitHub Pages artifact
|
||||
uses: actions/upload-pages-artifact@v1.0.8
|
||||
with:
|
||||
|
|
Loading…
Reference in a new issue