Skip to content

Commit

Permalink
fix(web-components): add step in github pages workflow to fix navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hristo Hristov authored and Hristo Hristov committed Dec 4, 2024
1 parent 6d028b0 commit 51b4683
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ jobs:
node-version: ${{ matrix.node-version }}
# cache: 'npm' # enable after committing lock file from first install
- run: npm i # replace with 'npm ci' after committing lock file from first install
- name: Update Router Navigation
run: |
sed -i "s|Router.go(\`/|Router.go(\`/${{ github.event.repository.name }}/|g" ./src/app/app.ts
sed -i "s|Router.go(\`/|Router.go(\`/${{ github.event.repository.name }}/|g" ./src/app/home/home.ts
- run: npm run build
- name: Update base href in index.html
run: sed -i 's|<base href="[^"]*"|<base href="/${{ github.event.repository.name }}/">|' ./dist/index.html
run: |
sed -i 's|<base href="[^"]*">|<base href="/${{ github.event.repository.name }}/">|' ./dist/index.html
- name: Update Resource Paths
run: find ./dist -maxdepth 1 -type f ! -name 'sw*.js' ! -name 'workbox*.js' -name '*.js' -exec sed -i -e "s|/src/assets|/${{ github.event.repository.name }}/src/assets|g" -e "s|url('/src/assets|url('/${{ github.event.repository.name }}/src/assets|g" {} +
- name: Copy ig-theme.css to dist
Expand Down

0 comments on commit 51b4683

Please sign in to comment.