Skip to content

Commit 4da7047

Browse files
Copilotmattleibow
andcommitted
Add .nojekyll fixes to prevent Jekyll from stripping _framework directory
GitHub Pages uses Jekyll by default which strips directories starting with underscore (like _framework). A .nojekyll file disables this behavior, which is required for Blazor WASM apps to load correctly. Changes copied from PR #357: - docs-deploy.yml: touch docs/_site/.nojekyll in build step - docs-deploy.yml: touch .nojekyll + git add in staging deploy - docs-deploy-fork-pr.yml: touch .nojekyll + git add in staging deploy Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
1 parent 07c2b11 commit 4da7047

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/docs-deploy-fork-pr.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,13 @@ jobs:
8989
rm -rf staging/$PR_NUMBER/*
9090
cp -r /tmp/site-temp/. staging/$PR_NUMBER/
9191
rm -rf /tmp/site-temp
92+
93+
# Ensure .nojekyll exists at root so _framework is served
94+
touch .nojekyll
95+
9296
git config --local user.email "action@github.com"
9397
git config --local user.name "GitHub Action"
94-
git add staging/$PR_NUMBER
98+
git add .nojekyll staging/$PR_NUMBER
9599
if ! git diff --cached --quiet; then
96100
git commit -m "Deploy staging docs for PR #$PR_NUMBER"
97101
git push origin gh-pages

.github/workflows/docs-deploy.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ jobs:
110110
mkdir -p docs/_site/sample
111111
cp -r publish/sample/wwwroot/. docs/_site/sample/
112112
113+
# Disable Jekyll processing so _framework directory is served
114+
touch docs/_site/.nojekyll
115+
113116
# Rewrite base href for deployment
114117
sed -i "s|<base href=\"/\" />|<base href=\"$BASE_HREF\" />|" docs/_site/sample/index.html
115118
@@ -179,9 +182,13 @@ jobs:
179182
rm -rf staging/$PR_NUMBER/*
180183
cp -r /tmp/site-temp/. staging/$PR_NUMBER/
181184
rm -rf /tmp/site-temp
185+
186+
# Ensure .nojekyll exists at root so _framework is served
187+
touch .nojekyll
188+
182189
git config --local user.email "action@github.com"
183190
git config --local user.name "GitHub Action"
184-
git add staging/$PR_NUMBER
191+
git add .nojekyll staging/$PR_NUMBER
185192
if ! git diff --cached --quiet; then
186193
git commit -m "Deploy staging docs for PR #$PR_NUMBER"
187194
git push origin gh-pages

0 commit comments

Comments
 (0)