33
44name : Build Stride Docs for Azure Web App Release 🚀
55
6- permissions :
7- contents : write # required to create releases/tags
8-
96env :
107 COMMON_SETTINGS_PATH : en/docfx.json
118 VERSION : " 2.0.0.${{ github.run_number }}"
2320 - .gitignore
2421 - ' .github/**'
2522 workflow_dispatch :
23+ inputs :
24+ skipPdfBuilding :
25+ description : Skip PDF building
26+ required : true
27+ default : true
28+ type : boolean
29+ skipApiBuilding :
30+ description : Skip API building
31+ required : true
32+ default : true
33+ type : boolean
34+ strideBranch :
35+ description : Stride branch to checkout
36+ required : true
37+ default : master
38+ type : string
39+
40+ permissions :
41+ contents : write # required to create releases/tags
2642
2743jobs :
2844 build :
2945 # Run this job only if the repository is 'stride3d/stride-docs'
3046 if : github.repository == 'stride3d/stride-docs'
31- runs-on : windows-latest
47+ runs-on : windows-2025-vs2026
3248
3349 steps :
34- - name : .NET SDK Setup
35- uses : actions/setup-dotnet@v5
36- with :
37- dotnet-version : 10.x
38-
3950 # Checkout the Stride Docs repository from the branch that triggered the workflow
4051 - name : Checkout Stride Docs
4152 uses : actions/checkout@v6
4253 with :
4354 path : ${{ env.DOCS_PATH }}
4455 lfs : true
4556
46- - name : Set Version in docfx.json
47- run : |
48- $settingsContent = Get-Content -Path "${{ env.DOCS_PATH }}/${{ env.COMMON_SETTINGS_PATH }}" -Raw
49- $updatedDocFxJsonContent = $settingsContent -replace '2.0.0.x', "${{ env.VERSION }}"
50- Set-Content -Path "${{ env.DOCS_PATH }}/${{ env.COMMON_SETTINGS_PATH }}" -Value $updatedDocFxJsonContent
51- shell : pwsh
52-
53- # Checkout the Stride repository from the default branch
54- - name : Checkout Stride (note the LFS)
55- uses : actions/checkout@v6
57+ - name : Run Global Setup
58+ id : setup
59+ uses : ./stride-docs/.github/actions/setup-stride
5660 with :
57- repository : stride3d/stride
58- token : ${{ secrets.GITHUB_TOKEN }}
59- path : stride
60- lfs : true
61- ref : master
62-
63- # Temporary solution till the new docfx is available
64- # - name: Checkout DocFX
65- # uses: actions/checkout@v6
66- # with:
67- # repository: dotnet/docfx
68- # # Tested commit
69- # ref: 917cda864650279e0bbe50b852cb98601e5efa4d
70- # path: docfx-build
71- # fetch-depth: 0
72-
73- # - name: Restore npm dependencies
74- # run: npm install
75- # working-directory: docfx-build/templates
76-
77- # - name: Build site templates
78- # run: npm run build
79- # working-directory: docfx-build/templates
80-
81- # - name: Build DocFX from PR
82- # run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
83- # working-directory: docfx-build
84- # shell: pwsh
85-
86- # - name: Build Install DocFX
87- # run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
88- # working-directory: docfx-build
89- # shell: pwsh
90- # End of Temporary solution
91-
92- - name : Install DocFX
93- # This installs the latest version of DocFX and may introduce breaking changes
94- # run: dotnet tool update -g docfx
95- # This installs a specific, tested version of DocFX.
96- run : dotnet tool update -g docfx --version 2.78.5
97-
98- - name : Build documentation
99- run : ./build-all.bat
100- working-directory : ${{ env.DOCS_PATH }}
101-
102- - name : Compress artifact
103- run : 7z a -r DocFX-app.zip ./${{ env.DOCS_PATH }}/_site/*
61+ github-token : ${{ secrets.GITHUB_TOKEN }}
62+ skip-pdf-building : ${{ inputs.skipPdfBuilding }}
63+ skip-api-building : ${{ inputs.skipApiBuilding }}
64+ stride-branch : ${{ inputs.strideBranch || 'master' }}
10465
10566 - name : Upload artifact for deployment job
106- uses : actions/upload-artifact@v6
67+ uses : actions/upload-artifact@v7
10768 with :
10869 name : DocFX-app
109- path : DocFX-app.zip
70+ path : ./${{ env.DOCS_PATH }}/_site
11071
11172 - name : Create GitHub Release
11273 run : |
11778
11879 deploy :
11980 if : github.repository == 'stride3d/stride-docs'
120- runs-on : windows-latest
81+ runs-on : windows-2025-vs2026
12182
12283 needs : build
12384 environment :
@@ -126,15 +87,10 @@ jobs:
12687
12788 steps :
12889 - name : Download artifact from build job
129- uses : actions/download-artifact@v7
90+ uses : actions/download-artifact@v8
13091 with :
13192 name : DocFX-app
132-
133- # - name: List current directory
134- # run: ls
135-
136- - name : Decompress artifact
137- run : 7z x DocFX-app.zip "-o./${{ env.DOCS_PATH }}/_site"
93+ path : ./${{ env.DOCS_PATH }}/_site
13894
13995 - name : Deploy to Azure Web App
14096 id : deploy-to-webapp
14399 app-name : ' stride-doc'
144100 slot-name : ' Production'
145101 publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_4803638D673FA67D0C8650F34C4FA9D1 }}
146- package : ./${{ env.DOCS_PATH }}/_site
102+ package : ./${{ env.DOCS_PATH }}/_site
0 commit comments