Skip to content

Commit 8d333bd

Browse files
authored
Merge pull request #440 from stride3d/master
Build Stride Docs for Azure Web App Staging
2 parents 9f1bcda + a61fda1 commit 8d333bd

5 files changed

Lines changed: 227 additions & 48 deletions

File tree

.github/workflows/stride-docs-github.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ on:
1212

1313
jobs:
1414
publish-docs:
15-
runs-on: windows-2022
15+
runs-on: windows-latest
1616

1717
steps:
1818
- name: .NET SDK Setup
1919
uses: actions/setup-dotnet@v4
2020
with:
21-
dotnet-version: 8.x
21+
dotnet-version: 10.x
2222

2323
# Checkout the Stride Docs repository from the branch that triggered the workflow
2424
- name: Checkout Stride Docs
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626
with:
2727
path: ${{ env.DOCS_PATH }}
2828
lfs: true
@@ -36,7 +36,7 @@ jobs:
3636

3737
# Checkout the Stride repository from the default branch
3838
- name: Checkout Stride (note the LFS)
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@v5
4040
with:
4141
repository: stride3d/stride
4242
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/stride-docs-release-azure.yml

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ jobs:
2828
build:
2929
# Run this job only if the repository is 'stride3d/stride-docs'
3030
if: github.repository == 'stride3d/stride-docs'
31-
runs-on: windows-2022
31+
runs-on: windows-latest
3232

3333
steps:
3434
- name: .NET SDK Setup
3535
uses: actions/setup-dotnet@v4
3636
with:
37-
dotnet-version: 8.x
37+
dotnet-version: 10.x
3838

3939
# Checkout the Stride Docs repository from the branch that triggered the workflow
4040
- name: Checkout Stride Docs
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@v5
4242
with:
4343
path: ${{ env.DOCS_PATH }}
4444
lfs: true
@@ -52,18 +52,46 @@ jobs:
5252

5353
# Checkout the Stride repository from the default branch
5454
- name: Checkout Stride (note the LFS)
55-
uses: actions/checkout@v4
55+
uses: actions/checkout@v5
5656
with:
5757
repository: stride3d/stride
5858
token: ${{ secrets.GITHUB_TOKEN }}
5959
path: stride
6060
lfs: true
61+
ref: master
6162

62-
- name: Install DocFX
63+
# Temporary solution till the new docfx is available
64+
- name: Checkout DocFX PR Branch
65+
uses: actions/checkout@v5
66+
with:
67+
repository: filzrev/docfx
68+
ref: feat-add-net10-support
69+
path: docfx-build
70+
71+
- name: Restore npm dependencies
72+
run: npm install
73+
working-directory: docfx-build/templates
74+
75+
- name: Build site templates
76+
run: npm run build
77+
working-directory: docfx-build/templates
78+
79+
- name: Build DocFX from PR
80+
run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
81+
working-directory: docfx-build
82+
shell: pwsh
83+
84+
- name: Build Install DocFX
85+
run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
86+
working-directory: docfx-build
87+
shell: pwsh
88+
# End of Temporary solution
89+
90+
#- name: Install DocFX
6391
# This installs the latest version of DocFX and may introduce breaking changes
6492
# run: dotnet tool update -g docfx
6593
# This installs a specific, tested version of DocFX.
66-
run: dotnet tool update -g docfx --version 2.78.3
94+
#run: dotnet tool update -g docfx --version 2.78.3
6795

6896
- name: Build documentation
6997
run: ./build-all.bat
@@ -73,7 +101,7 @@ jobs:
73101
run: 7z a -r DocFX-app.zip ./${{ env.DOCS_PATH }}/_site/*
74102

75103
- name: Upload artifact for deployment job
76-
uses: actions/upload-artifact@v4
104+
uses: actions/upload-artifact@v5
77105
with:
78106
name: DocFX-app
79107
path: DocFX-app.zip
@@ -87,7 +115,7 @@ jobs:
87115

88116
deploy:
89117
if: github.repository == 'stride3d/stride-docs'
90-
runs-on: windows-2022
118+
runs-on: windows-latest
91119

92120
needs: build
93121
environment:
@@ -96,7 +124,7 @@ jobs:
96124

97125
steps:
98126
- name: Download artifact from build job
99-
uses: actions/download-artifact@v4
127+
uses: actions/download-artifact@v6
100128
with:
101129
name: DocFX-app
102130

.github/workflows/stride-docs-release-fast-track-azure.yml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# The Fast Track skips creating artifacts and compressing them
55
name: Build Stride Docs (Fast Track) for Azure Web App Release 🚀
66

7+
permissions:
8+
contents: write # required to create releases/tags
9+
710
env:
811
COMMON_SETTINGS_PATH: en/docfx.json
912
VERSION: "2.0.0.${{ github.run_number }}"
@@ -16,7 +19,7 @@ jobs:
1619
build-deploy:
1720
# Run this job only if the repository is 'stride3d/stride-docs'
1821
if: github.repository == 'stride3d/stride-docs'
19-
runs-on: windows-2022
22+
runs-on: windows-latest
2023

2124
environment:
2225
name: 'Production'
@@ -25,11 +28,11 @@ jobs:
2528
- name: .NET SDK Setup
2629
uses: actions/setup-dotnet@v4
2730
with:
28-
dotnet-version: 8.x
31+
dotnet-version: 10.x
2932

3033
# Checkout the Stride Docs repository from the branch that triggered the workflow
3134
- name: Checkout Stride Docs
32-
uses: actions/checkout@v4
35+
uses: actions/checkout@v5
3336
with:
3437
path: ${{ env.DOCS_PATH }}
3538
lfs: true
@@ -43,18 +46,46 @@ jobs:
4346

4447
# Checkout the Stride repository from the default branch
4548
- name: Checkout Stride (note the LFS)
46-
uses: actions/checkout@v4
49+
uses: actions/checkout@v5
4750
with:
4851
repository: stride3d/stride
4952
token: ${{ secrets.GITHUB_TOKEN }}
5053
path: stride
5154
lfs: true
55+
ref: master
56+
57+
# Temporary solution till the new docfx is available
58+
- name: Checkout DocFX PR Branch
59+
uses: actions/checkout@v5
60+
with:
61+
repository: filzrev/docfx
62+
ref: feat-add-net10-support
63+
path: docfx-build
64+
65+
- name: Restore npm dependencies
66+
run: npm install
67+
working-directory: docfx-build/templates
5268

53-
- name: Install DocFX
69+
- name: Build site templates
70+
run: npm run build
71+
working-directory: docfx-build/templates
72+
73+
- name: Build DocFX from PR
74+
run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
75+
working-directory: docfx-build
76+
shell: pwsh
77+
78+
- name: Build Install DocFX
79+
run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
80+
working-directory: docfx-build
81+
shell: pwsh
82+
# End of Temporary solution
83+
84+
#- name: Install DocFX
5485
# This installs the latest version of DocFX and may introduce breaking changes
5586
# run: dotnet tool update -g docfx
5687
# This installs a specific, tested version of DocFX.
57-
run: dotnet tool update -g docfx --version 2.78.3
88+
#run: dotnet tool update -g docfx --version 2.78.3
5889

5990
- name: Build documentation
6091
run: ./build-all.bat

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

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
build-deploy:
1717
# Run this job only if the repository is 'stride3d/stride-docs'
1818
if: github.repository == 'stride3d/stride-docs'
19-
runs-on: windows-2022
19+
runs-on: windows-latest
2020

2121
environment:
2222
name: 'Production'
@@ -25,11 +25,11 @@ jobs:
2525
- name: .NET SDK Setup
2626
uses: actions/setup-dotnet@v4
2727
with:
28-
dotnet-version: 8.x
28+
dotnet-version: 10.x
2929

3030
# Checkout the Stride Docs repository from the branch that triggered the workflow
3131
- name: Checkout Stride Docs
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333
with:
3434
path: ${{ env.DOCS_PATH }}
3535
lfs: true
@@ -43,18 +43,46 @@ jobs:
4343

4444
# Checkout the Stride repository from the default branch
4545
- name: Checkout Stride (note the LFS)
46-
uses: actions/checkout@v4
46+
uses: actions/checkout@v5
4747
with:
4848
repository: stride3d/stride
4949
token: ${{ secrets.GITHUB_TOKEN }}
5050
path: stride
5151
lfs: true
52+
ref: master
5253

53-
- name: Install DocFX
54+
# Temporary solution till the new docfx is available
55+
- name: Checkout DocFX PR Branch
56+
uses: actions/checkout@v5
57+
with:
58+
repository: filzrev/docfx
59+
ref: feat-add-net10-support
60+
path: docfx-build
61+
62+
- name: Restore npm dependencies
63+
run: npm install
64+
working-directory: docfx-build/templates
65+
66+
- name: Build site templates
67+
run: npm run build
68+
working-directory: docfx-build/templates
69+
70+
- name: Build DocFX from PR
71+
run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
72+
working-directory: docfx-build
73+
shell: pwsh
74+
75+
- name: Build Install DocFX
76+
run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
77+
working-directory: docfx-build
78+
shell: pwsh
79+
# End of Temporary solution
80+
81+
#- name: Install DocFX
5482
# This installs the latest version of DocFX and may introduce breaking changes
5583
# run: dotnet tool update -g docfx
5684
# This installs a specific, tested version of DocFX.
57-
run: dotnet tool update -g docfx --version 2.78.3
85+
#run: dotnet tool update -g docfx --version 2.78.3
5886

5987
- name: Build documentation
6088
run: ./build-all.bat

0 commit comments

Comments
 (0)