Skip to content

Commit 6ff5999

Browse files
Hristo HristovHristo Hristov
authored andcommitted
fix(wc): fix paths in web components workflow
1 parent 266ec2f commit 6ff5999

File tree

1 file changed

+2
-2
lines changed
  • packages/cli/templates/webcomponents/igc-ts/projects/_base/files/__dot__github/workflows

1 file changed

+2
-2
lines changed

packages/cli/templates/webcomponents/igc-ts/projects/_base/files/__dot__github/workflows/github-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
find ./src -type f -name "*.ts" -exec sed -i "s|Router.go(\`/|Router.go(\`/${{ github.event.repository.name }}/|g" {} \;
3737
find ./ -type f -name "vite.config.ts" -exec sed -i "s|navigateFallback: '/index.html'|navigateFallback: 'index.html'|g" {} \;
38-
- run: npm run build
38+
- run: npm run build -- --base=/${{ github.event.repository.name }}/
3939
- name: Update base href in index.html
4040
run: |
4141
sed -i 's|<base href="[^"]*">|<base href="/${{ github.event.repository.name }}/">|' ./dist/index.html
@@ -44,7 +44,7 @@ jobs:
4444
- name: Copy ig-theme.css to dist
4545
run: cp ./ig-theme.css ./dist/
4646
- name: Update href Paths for ig-theme.css
47-
run: find ./dist -type f -exec sed -i "s|href=\"../../ig-theme.css\"|href=\"../../${{ github.event.repository.name }}/ig-theme.css\"|g" {} +
47+
run: find ./dist -type f -exec sed -i "s|href=['\"]../../ig-theme.css['\"]|href='../../${{ github.event.repository.name }}/ig-theme.css'|g" {} +
4848
- name: SPA routing handling
4949
run: cp ./dist/index.html ./dist/404.html
5050
- name: Upload build artifact to GitHub Pages

0 commit comments

Comments
 (0)