Skip to content

Commit

Permalink
Fix: Fix the image not found on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
whats2000 committed Aug 21, 2024
1 parent 0b742fc commit ae755b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
with:
html_path: ${{ env.PUBLISH_DIR }}/index.html
base_href: /PearlCalculatorBlazor/

- name: Change base-tag in index.html from / to PearlCalculatorBlazor
run: |
sed -i 's|<base href="/"|<base href="/PearlCalculatorBlazor/"|' ${{ env.PUBLISH_DIR }}/index.html
- name: Fix service-worker-assets.js hashes
working-directory: bin/Release/net5.0/publish/wwwroot
Expand Down
19 changes: 4 additions & 15 deletions PearlCalculatorBlazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@

<ItemGroup>
<Compile Remove="PearlCalculatorLib\**" />
<Compile Remove="wwwroot\resources\**" />
<Content Remove="PearlCalculatorLib\**" />
<Content Remove="wwwroot\resources\**" />
<EmbeddedResource Remove="PearlCalculatorLib\**" />
<EmbeddedResource Remove="wwwroot\resources\**" />
<None Remove="PearlCalculatorLib\**" />
<None Remove="wwwroot\resources\**" />
</ItemGroup>

<ItemGroup>
Expand All @@ -34,21 +38,6 @@
<Folder Include="Localizer\" />
</ItemGroup>

<ItemGroup>
<Page Include="wwwroot\resources\assets\i18n\en.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Page>
</ItemGroup>

<ItemGroup>
<Resource Include="wwwroot\resources\assets\i18n\zh_cn.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="wwwroot\resources\assets\i18n\zh_tw.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>

<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>

</Project>

0 comments on commit ae755b7

Please sign in to comment.