Skip to content

Commit 0a8bcd8

Browse files
committed
README and more
1 parent ed14ddc commit 0a8bcd8

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/test.yml

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
project-path: Test/Test.csproj
2323
main-repo: false
24+
fix-404: true
2425
- name: Verify
2526
run: Test/Verify.sh --non-main-repo --fix-404 ${{ github.event.repository.name }}
2627

@@ -38,6 +39,7 @@ jobs:
3839
with:
3940
project-path: Test/Test.csproj
4041
main-repo: true
42+
fix-404: true
4143
- name: Verify
4244
run: Test/Verify.sh --main-repo --fix-404 ${{ github.event.repository.name }}
4345

@@ -55,6 +57,7 @@ jobs:
5557
with:
5658
project-path: Test/Test.csproj
5759
main-repo: false
60+
fix-404: false
5861
- name: Verify
5962
run: Test/Verify.sh --non-main-repo --no-fix-404 ${{ github.event.repository.name }}
6063

@@ -72,5 +75,6 @@ jobs:
7275
with:
7376
project-path: Test/Test.csproj
7477
main-repo: true
78+
fix-404: false
7579
- name: Verify
7680
run: Test/Verify.sh --main-repo --no-fix-404 ${{ github.event.repository.name }}

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Restore, build, and publish the project, modify index.html to fit the repository
77
## How to use
88
First, set Repository Settings - Pages - Source to GitHub Actions.
99

10-
This action has three inputs and one output.
10+
This action has four inputs and one output.
1111

1212
### Inputs
1313
`project-path`: Path of project (.csproj). Default is `(repo name)/(repo name).csproj`.
@@ -16,6 +16,8 @@ This action has three inputs and one output.
1616

1717
`main-repo`: Set to `true` only when running this action from the default GitHub Pages repository (`{username}.github.io`).
1818

19+
`fix-404`: Whether to apply repository-specific modifications to 404.html as well. This only takes effect when main-repo is false. Default is `true`.
20+
1921
### Outputs
2022
`wwwroot-path`: The resulting `wwwroot` path. It must be passed to `path` in the `upload-pages-artifact` step.
2123

Test/Verify.sh

+2
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ fi
3131

3232
if [ $MAINREPO == false ] && [ $FIX404 == true ]; then
3333
grep -i "/$3/?p=/" _out/wwwroot/404.html > /dev/null
34+
else
35+
! grep -i "/$3/?p=/" _out/wwwroot/404.html > /dev/null
3436
fi

0 commit comments

Comments
 (0)