File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 22
33name : Build Stride Docs for GitHub Staging
44
5+ env :
6+ COMMON_SETTINGS_PATH : en/docfx.json
7+ VERSION : " 2.0.0.${{ github.run_number }}"
8+ DOCS_PATH : stride-docs
9+
510on :
611 workflow_dispatch :
712
1015 runs-on : windows-2022
1116
1217 steps :
13- # Setup .NET SDK
14- - name : Dotnet Setup
18+ - name : .NET SDK Setup
1519 uses : actions/setup-dotnet@v4
1620 with :
1721 dotnet-version : 8.x
2024 - name : Checkout Stride Docs
2125 uses : actions/checkout@v4
2226 with :
23- path : stride-docs
27+ path : ${{ env.DOCS_PATH }}
2428 lfs : true
2529
30+ - name : Set Version in docfx.json
31+ run : |
32+ $settingsContent = Get-Content -Path "${{ env.DOCS_PATH }}/${{ env.COMMON_SETTINGS_PATH }}" -Raw
33+ $updatedDocFxJsonContent = $settingsContent -replace '2.0.0.x', "${{ env.VERSION }}"
34+ Set-Content -Path "${{ env.DOCS_PATH }}/${{ env.COMMON_SETTINGS_PATH }}" -Value $updatedDocFxJsonContent
35+ shell : pwsh
36+
2637 # Checkout the Stride repository from the default branch
2738 - name : Checkout Stride (note the LFS)
2839 uses : actions/checkout@v4
@@ -40,11 +51,11 @@ jobs:
4051
4152 - name : Build documentation
4253 run : ./build-all.bat
43- working-directory : stride-docs
54+ working-directory : ${{ env.DOCS_PATH }}
4455
4556 - name : Deploy
46574758 with :
4859 github_token : ${{ secrets.GITHUB_TOKEN }}
49- publish_dir : stride-docs /_site
60+ publish_dir : ${{ env.DOCS_PATH }} /_site
5061 publish_branch : gh-pages
You can’t perform that action at this time.
0 commit comments