@@ -161,7 +161,9 @@ jobs:
161161 id : nbgv
162162 run : |
163163 VERSION=$(nbgv get-version -v SimpleVersion)
164+ FULL_VERSION=$(nbgv get-version -v SemVer2)
164165 echo "version=$VERSION" >> $GITHUB_OUTPUT
166+ echo "fullVersion=$FULL_VERSION" >> $GITHUB_OUTPUT
165167 echo "[INFO] Web App Version: $VERSION"
166168
167169 - name : Setup Pages
@@ -171,64 +173,36 @@ jobs:
171173 run : dotnet restore SchemaMagic.Web/SchemaMagic.Web.csproj
172174
173175 - name : Publish
174- run : dotnet publish SchemaMagic.Web/SchemaMagic.Web.csproj --configuration Release --output dist /
176+ run : dotnet publish SchemaMagic.Web/SchemaMagic.Web.csproj --configuration Release --output publish /
175177
176178 - name : List published files
177179 run : |
178180 echo "[INFO] Listing published files..."
179- ls -la dist /
181+ ls -la publish /
180182 echo "[INFO] Checking for wwwroot..."
181- if [ -d "dist /wwwroot" ]; then
183+ if [ -d "publish /wwwroot" ]; then
182184 echo "[INFO] wwwroot exists, listing contents..."
183- ls -la dist /wwwroot/
184- echo "[INFO] Looking for index.html in wwwroot ..."
185- find dist /wwwroot -name "index.html" -type f || echo "[INFO] No index.html found in wwwroot"
185+ ls -la publish /wwwroot/ | head -20
186+ echo "[INFO] Checking for _framework ..."
187+ ls -la publish /wwwroot/_framework/ | head -10 || echo "[INFO] No _framework in wwwroot"
186188 else
187189 echo "[INFO] No wwwroot directory found"
190+ echo "[INFO] Checking for _framework in publish root..."
191+ ls -la publish/_framework/ | head -10 || echo "[INFO] No _framework in publish root"
188192 fi
189- echo "[INFO] Searching for ALL index.html files in dist/..."
190- find dist/ -name "index.html" -type f || echo "[INFO] No index.html found anywhere in dist/"
191- echo "[INFO] Listing ALL files in dist/ recursively (first 50)..."
192- find dist/ -type f | head -50
193+ echo "[INFO] Searching for index.html..."
194+ find publish/ -name "index.html" -type f
193195
194- - name : Fix base path for GitHub Pages
196+ - name : Configure for GitHub Pages
195197 run : |
196- echo "[INFO] Configuring for GitHub Pages..."
198+ echo "[INFO] Configuring for GitHub Pages with custom domain (schema.magicsuite.net) ..."
197199
198- # Check if index.html is in wwwroot subdirectory
199- if [ -f "dist/wwwroot/index.html" ]; then
200- echo "[INFO] Found index.html in dist/wwwroot/"
201- sed -i 's|<base href="/" />|<base href="/SchemaMagic/" />|g' dist/wwwroot/index.html
202- touch dist/wwwroot/.nojekyll
203- cp dist/wwwroot/index.html dist/wwwroot/404.html
204- echo "${{ steps.nbgv.outputs.version }}" > dist/wwwroot/version.txt
205- elif [ -f "dist/index.html" ]; then
206- echo "[INFO] Found index.html in dist/"
207- sed -i 's|<base href="/" />|<base href="/SchemaMagic/" />|g' dist/index.html
208- touch dist/.nojekyll
209- cp dist/index.html dist/404.html
210- echo "${{ steps.nbgv.outputs.version }}" > dist/version.txt
200+ # Determine the correct directory structure
201+ if [ -d "publish/wwwroot" ]; then
202+ echo "[INFO] Found publish/wwwroot/ - using it as deployment root"
203+ DEPLOY_DIR="publish/wwwroot"
211204 else
212- echo "[ERROR] Could not find index.html in dist/ or dist/wwwroot/ "
213- exit 1
205+ echo "[INFO] No wwwroot subdirectory - using publish/ as deployment root "
206+ DEPLOY_DIR="publish"
214207 fi
215-
216- echo "[SUCCESS] GitHub Pages configuration complete"
217- echo "[INFO] Version: ${{ steps.nbgv.outputs.version }}"
218-
219- - name : Upload artifact
220- uses : actions/upload-pages-artifact@v3
221- with :
222- path : dist/wwwroot/
223-
224- - name : Deploy to GitHub Pages
225- id : deployment
226- uses : actions/deploy-pages@v4
227-
228- - name : Deployment Summary
229- run : |
230- echo "### Deployment Successful!" >> $GITHUB_STEP_SUMMARY
231- echo "" >> $GITHUB_STEP_SUMMARY
232- echo "**Version:** ${{ steps.nbgv.outputs.version }}" >> $GITHUB_STEP_SUMMARY
233- echo "**URL:** ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY
234- echo "**Deployed:** $(date -u +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_STEP_SUMMARY
208+
0 commit comments