Browse Source

Merge pull request #114 from VaclavElias/update-2

Update 2 - Improvements
Vaclav Elias 2 years ago
parent
commit
c90c9896c0

+ 3 - 1
.github/workflows/stride-docs-staging-azure.yml

@@ -18,6 +18,7 @@ on:
 
 jobs:
   build:
+    if: github.repository == 'stride3d/stride-docs'
     runs-on: windows-2022
 
     steps:
@@ -44,7 +45,7 @@ jobs:
       # This installs the latest version of DocFX and may introduce breaking changes.
       # run: dotnet tool update -g docfx
       # This installs a specific, tested version of DocFX.
-      run: dotnet tool update -g docfx --version 2.70.1
+      run: dotnet tool update -g docfx --version 2.70.3
 
     - name: Build documentation
       run: ./build-all.bat
@@ -60,6 +61,7 @@ jobs:
         path: DocFX-app.zip
 
   deploy:
+    if: github.repository == 'stride3d/stride-docs'
     runs-on: windows-2022
     needs: build
     environment:

+ 3 - 2
.github/workflows/stride-docs-staging-fast-track-azure.yml

@@ -6,7 +6,7 @@ name: Build Stride Docs (Fast Track) for Azure Web App Staging
 on:
   # push:
   #   branches:
-  #     - main
+  #     - staging
   #   paths-ignore:
   #     - 'README.md'
   #     - 'Stride.Docs.sln'
@@ -18,6 +18,7 @@ on:
 
 jobs:
   build-deploy:
+    if: github.repository == 'stride3d/stride-docs'
     runs-on: windows-2022
     environment:
       name: 'Production'
@@ -46,7 +47,7 @@ jobs:
       # This installs the latest version of DocFX and may introduce breaking changes.
       # run: dotnet tool update -g docfx
       # This installs a specific, tested version of DocFX.
-      run: dotnet tool update -g docfx --version 2.70.1
+      run: dotnet tool update -g docfx --version 2.70.3
 
     - name: Build documentation
       run: ./build-all.bat

+ 1 - 1
BuildDocs.ps1

@@ -311,7 +311,7 @@ function PostProcessing-DocFxDocUrl {
         $relativeHtmlPath = $htmlFile.FullName.Replace((Resolve-Path "$($Settings.SiteDirectory)/$($SelectedLanguage.Code)").Path + '\', '').Replace('.html', '.md')
 
         # Read the content of the HTML file
-        $content = Get-Content $htmlFile
+        $content = Get-Content $htmlFile -Encoding UTF8
 
         # Define a regex pattern to match the meta tag with name="docfx:docurl"
         $pattern = '(<meta name="docfx:docurl" content=".*?)(/' + $SelectedLanguage.Code + $Settings.TempDirectory+ '/)(.*?">)'