Skip to content

Commit c1cbf11

Browse files
committed
ci: resolve WebGL output path for pages artifact
1 parent 3191584 commit c1cbf11

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/webgl-pages.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,29 @@ jobs:
6666
targetPlatform: WebGL
6767
buildMethod: BuildScript.BuildWebGLForPages
6868

69+
- name: Resolve WebGL output path
70+
id: webgl-output
71+
run: |
72+
if [ -d Build/WebGL ]; then
73+
echo "path=Build/WebGL" >> "$GITHUB_OUTPUT"
74+
elif [ -d build/WebGL ]; then
75+
echo "path=build/WebGL" >> "$GITHUB_OUTPUT"
76+
else
77+
echo "::error::WebGL output not found in Build/WebGL or build/WebGL."
78+
echo "Directory snapshot:"
79+
find . -maxdepth 3 -type d | sort
80+
exit 1
81+
fi
82+
6983
- name: Add .nojekyll marker
70-
run: touch Build/WebGL/.nojekyll
84+
run: touch "${{ steps.webgl-output.outputs.path }}/.nojekyll"
7185

7286
- name: Prepare showcase site artifact
7387
run: |
7488
rm -rf site-dist
7589
mkdir -p site-dist/unity
7690
cp -R web/. site-dist/
77-
cp -R Build/WebGL/. site-dist/unity/
91+
cp -R "${{ steps.webgl-output.outputs.path }}/." site-dist/unity/
7892
touch site-dist/.nojekyll
7993
8094
- name: Configure GitHub Pages

0 commit comments

Comments
 (0)