Skip to content

Commit 943ed29

Browse files
authored
Merge pull request #510 from stride3d/master
Deploy latest documentation updates to staging
2 parents a1c95f9 + d0315d9 commit 943ed29

203 files changed

Lines changed: 3164 additions & 1438 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919
*.docx filter=lfs diff=lfs merge=lfs -text
2020
*.webp filter=lfs diff=lfs merge=lfs -text
2121
*.vsdx filter=lfs diff=lfs merge=lfs -text
22+
*.svg filter=lfs diff=lfs merge=lfs -text
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: 'Setup Stride'
2+
description: 'Sets up .NET, checkouts repos, and installs DocFX'
3+
4+
inputs:
5+
github-token:
6+
description: 'GitHub token used for repository checkout'
7+
required: true
8+
skip-pdf-building:
9+
description: 'Skip PDF building when set to true'
10+
required: false
11+
default: 'false'
12+
skip-api-building:
13+
description: 'Skip API building when set to true'
14+
required: false
15+
default: 'false'
16+
stride-branch:
17+
description: 'Stride branch to checkout'
18+
required: false
19+
default: 'master'
20+
21+
runs:
22+
using: "composite"
23+
24+
steps:
25+
- name: .NET SDK Setup
26+
uses: actions/setup-dotnet@v5
27+
with:
28+
dotnet-version: 10.x
29+
30+
# - name: Configure MSBuild SDK resolver - Temporary
31+
# run: |
32+
# $dotnetRoot = Split-Path (Get-Command dotnet).Source -Parent
33+
# $sdkVersion = & dotnet --version
34+
# $msbuildSdksPath = Join-Path $dotnetRoot "sdk\$sdkVersion\Sdks"
35+
36+
# echo "DOTNET_ROOT=$dotnetRoot" >> $env:GITHUB_ENV
37+
# echo "MSBuildSDKsPath=$msbuildSdksPath" >> $env:GITHUB_ENV
38+
# echo "MSBuildEnableWorkloadResolver=false" >> $env:GITHUB_ENV
39+
40+
# Write-Host "DOTNET_ROOT=$dotnetRoot"
41+
# Write-Host "MSBuildSDKsPath=$msbuildSdksPath"
42+
# Write-Host "MSBuildEnableWorkloadResolver=false"
43+
44+
# if (-not (Test-Path $msbuildSdksPath)) {
45+
# throw "MSBuildSDKsPath does not exist: $msbuildSdksPath"
46+
# }
47+
# shell: pwsh
48+
49+
- name: Set Version in docfx.json
50+
run: |
51+
$settingsContent = Get-Content -Path "${{ env.DOCS_PATH }}/${{ env.COMMON_SETTINGS_PATH }}" -Raw
52+
$updatedDocFxJsonContent = $settingsContent -replace '2.0.0.x', "${{ env.VERSION }}"
53+
Set-Content -Path "${{ env.DOCS_PATH }}/${{ env.COMMON_SETTINGS_PATH }}" -Value $updatedDocFxJsonContent
54+
shell: pwsh
55+
56+
# Checkout the Stride repository from the default branch
57+
- name: Checkout Stride (note the LFS)
58+
uses: actions/checkout@v6
59+
with:
60+
repository: stride3d/stride
61+
token: ${{ inputs.github-token }}
62+
path: stride
63+
lfs: true
64+
ref: ${{ inputs.stride-branch }}
65+
66+
- name: Set up dependency caching for faster builds
67+
uses: actions/cache@v5
68+
with:
69+
path: ~/.nuget/packages
70+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets', '**/packages.lock.json', '**/NuGet.config') }}
71+
restore-keys: |
72+
${{ runner.os }}-nuget-
73+
74+
# Temporary solution till the new docfx is available with Analyzers update
75+
- name: Checkout DocFX
76+
uses: actions/checkout@v6
77+
with:
78+
repository: VaclavElias/docfx
79+
# Tested commit
80+
# ref: 917cda864650279e0bbe50b852cb98601e5efa4d
81+
# Use the temp-fix branch
82+
ref: refs/heads/temp-fix
83+
path: docfx-build
84+
fetch-depth: 0
85+
86+
- name: Restore npm dependencies
87+
run: npm install
88+
working-directory: docfx-build/templates
89+
shell: pwsh
90+
91+
- name: Build site templates
92+
run: npm run build
93+
working-directory: docfx-build/templates
94+
shell: pwsh
95+
96+
- name: Add night build NuGet source
97+
run: |
98+
dotnet nuget add source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" --name dnceng-dotnet-tools --store-password-in-clear-text
99+
shell: pwsh
100+
101+
- name: Build DocFX from PR
102+
run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
103+
working-directory: docfx-build
104+
shell: pwsh
105+
106+
# - name: Install MSVC ARM64/ARM64EC build tools - Temporary
107+
# run: |
108+
# $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
109+
# $installer = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
110+
111+
# $installPath = & $vswhere -latest -products * -property installationPath
112+
113+
# if (-not $installPath) {
114+
# throw "Visual Studio installation not found."
115+
# }
116+
117+
# Write-Host "Visual Studio install path: $installPath"
118+
119+
# Start-Process -FilePath $installer -ArgumentList @(
120+
# "modify",
121+
# "--installPath", $installPath,
122+
# "--add", "Microsoft.VisualStudio.Component.VC.Tools.ARM64",
123+
# "--add", "Microsoft.VisualStudio.Component.VC.Tools.ARM64EC",
124+
# "--quiet",
125+
# "--norestart",
126+
# "--nocache",
127+
# "--wait"
128+
# ) -Wait -NoNewWindow
129+
# shell: pwsh
130+
131+
- name: Build Install DocFX
132+
run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
133+
working-directory: docfx-build
134+
shell: pwsh
135+
# End of Temporary solution
136+
137+
# - name: Install DocFX
138+
# # This installs the latest version of DocFX and may introduce breaking changes
139+
# # run: dotnet tool update -g docfx
140+
# # This installs a specific, tested version of DocFX.
141+
# run: dotnet tool update -g docfx --version 2.78.5
142+
# shell: pwsh
143+
144+
# - name: Prebuild Stride
145+
# run: dotnet build build\Stride.sln -c Release
146+
# working-directory: stride
147+
# shell: pwsh
148+
149+
- name: Build documentation
150+
run: |
151+
$arguments = @()
152+
153+
if ('${{ inputs.skip-pdf-building }}' -eq 'true') {
154+
$arguments += '-SkipPdfBuilding'
155+
}
156+
157+
if ('${{ inputs.skip-api-building }}' -eq 'true') {
158+
$arguments += '-SkipApiBuilding'
159+
}
160+
161+
./build-all.bat @arguments
162+
working-directory: ${{ env.DOCS_PATH }}
163+
shell: pwsh

.github/workflows/common-setup.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 49 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# More GitHub Actions for Azure: https://github.com/Azure/actions
2-
31
name: Build Stride Docs for GitHub Staging
42

53
env:
@@ -9,83 +7,65 @@ env:
97

108
on:
119
workflow_dispatch:
10+
inputs:
11+
skipPdfBuilding:
12+
description: Skip PDF building
13+
required: true
14+
default: true
15+
type: boolean
16+
skipApiBuilding:
17+
description: Skip API building
18+
required: true
19+
default: true
20+
type: boolean
21+
stride-branch:
22+
description: 'Stride branch to checkout'
23+
required: false
24+
default: 'master'
25+
26+
permissions:
27+
contents: read
28+
pages: write
29+
id-token: write
30+
31+
concurrency:
32+
group: pages
33+
cancel-in-progress: true
1234

1335
jobs:
14-
publish-docs:
15-
runs-on: windows-latest
36+
build:
37+
name: Build documentation
38+
runs-on: windows-2025-vs2026
1639

1740
steps:
18-
- name: .NET SDK Setup
19-
uses: actions/setup-dotnet@v5
20-
with:
21-
dotnet-version: 10.x
22-
23-
# Checkout the Stride Docs repository from the branch that triggered the workflow
2441
- name: Checkout Stride Docs
2542
uses: actions/checkout@v6
2643
with:
2744
path: ${{ env.DOCS_PATH }}
2845
lfs: true
2946

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-
37-
# Checkout the Stride repository from the default branch
38-
- name: Checkout Stride (note the LFS)
39-
uses: actions/checkout@v6
47+
- name: Run Global Setup
48+
id: setup
49+
uses: ./stride-docs/.github/actions/setup-stride
4050
with:
41-
repository: stride3d/stride
42-
token: ${{ secrets.GITHUB_TOKEN }}
43-
path: stride
44-
lfs: true
45-
ref: master
46-
47-
# Temporary solution till the new docfx is available
48-
# - name: Checkout DocFX
49-
# uses: actions/checkout@v6
50-
# with:
51-
# repository: dotnet/docfx
52-
# # Tested commit
53-
# ref: 917cda864650279e0bbe50b852cb98601e5efa4d
54-
# path: docfx-build
55-
# fetch-depth: 0
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
skip-pdf-building: ${{ inputs.skipPdfBuilding }}
53+
skip-api-building: ${{ inputs.skipApiBuilding }}
54+
stride-branch: ${{ inputs.strideBranch }}
5655

57-
# - name: Restore npm dependencies
58-
# run: npm install
59-
# working-directory: docfx-build/templates
60-
61-
# - name: Build site templates
62-
# run: npm run build
63-
# working-directory: docfx-build/templates
64-
65-
# - name: Build DocFX from PR
66-
# run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
67-
# working-directory: docfx-build
68-
# shell: pwsh
69-
70-
# - name: Build Install DocFX
71-
# run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
72-
# working-directory: docfx-build
73-
# shell: pwsh
74-
# End of Temporary solution
75-
76-
- name: Install DocFX
77-
# This installs the latest version of DocFX and may introduce breaking changes
78-
# run: dotnet tool update -g docfx
79-
# This installs a specific, tested version of DocFX.
80-
run: dotnet tool update -g docfx --version 2.78.5
81-
82-
- name: Build documentation
83-
run: ./build-all-skip-pdf.bat
84-
working-directory: ${{ env.DOCS_PATH }}
85-
86-
- name: Deploy
87-
uses: peaceiris/actions-gh-pages@v4
56+
- name: Upload Pages artifact
57+
uses: actions/upload-pages-artifact@v5
8858
with:
89-
github_token: ${{ secrets.GITHUB_TOKEN }}
90-
publish_dir: ${{ env.DOCS_PATH }}/_site
91-
publish_branch: gh-pages
59+
path: ${{ env.DOCS_PATH }}/_site
60+
61+
deploy:
62+
name: Deploy to GitHub Pages
63+
needs: build
64+
runs-on: ubuntu-latest
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
steps:
69+
- name: Deploy
70+
id: deployment
71+
uses: actions/deploy-pages@v5

0 commit comments

Comments
 (0)