Skip to content

Commit e74fd1e

Browse files
committed
Fix The Error Issue And Page Not Loading issue due to Shed Command Not Working
<base href="/TomAndJerry/" />
1 parent c33fe03 commit e74fd1e

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed

.github/workflows/dotnet.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
- name: Publish Blazor WebAssembly project
2121
run: dotnet publish TomAndJerry.csproj -c Release -o release --nologo
2222

23-
2423
- name: Add 404.html (for GitHub Pages SPA fallback)
2524
run: cp release/wwwroot/index.html release/wwwroot/404.html
2625

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
11
# TomAndJerry
22

3-
![Graph](DependencyGraphSnapshot.svg)
3+
![Graph](DependencyGraphSnapshot.svg)
4+
5+
## Some How Shed Command is not changing based address in github action
6+
7+
> Tip To Fix this Issue Is
8+
9+
1) Before Pushing To Github Just add Repo Name in Index Htmls Like
10+
```
11+
<base href="/TomAndJerry/" />
12+
```
13+
2) In YAML File Somehow Shed Command Is not working so use below some Sweet Code
14+
15+
```yaml
16+
name: watchTom
17+
18+
on:
19+
push:
20+
branches: [ "master" ]
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
30+
- name: Setup .NET
31+
uses: actions/setup-dotnet@v2
32+
with:
33+
dotnet-version: 8.0.x
34+
35+
- name: Publish Blazor WebAssembly project
36+
run: dotnet publish TomAndJerry.csproj -c Release -o release --nologo
37+
38+
- name: Add 404.html (for GitHub Pages SPA fallback)
39+
run: cp release/wwwroot/index.html release/wwwroot/404.html
40+
41+
- name: Add .nojekyll file
42+
run: touch release/wwwroot/.nojekyll
43+
44+
- name: Deploy to GitHub Pages
45+
uses: JamesIves/[email protected]
46+
with:
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
branch: gh-pages
49+
folder: release/wwwroot
50+
```

wwwroot/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8"/>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
77
<title>Tom And Jerry</title>
8-
<base href="/TomAndJerry/"/>
8+
<base href="/TomAndJerry/" />
99
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet"/>
1010
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet"/>
1111
<link rel="icon" type="image/png" href="favicon-32x32.png"/>

0 commit comments

Comments
 (0)