File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,11 @@ jobs:
128128 $ErrorActionPreference = "Stop"
129129 $PSNativeCommandUseErrorActionPreference = $true
130130 cd docs
131+ $zipFile = [IO.Path]::Combine($env:TEMP, 'docfx-net10-binaries.zip')
132+ Invoke-WebRequest -Uri 'https://github.com/json-api-dotnet/docfx/raw/refs/heads/dotnet10-rtm/net10-binaries.zip' -Method 'GET' -OutFile $zipFile
133+ Expand-Archive $zipFile -Force
131134 & ./generate-examples.ps1
132- dotnet docfx docfx.json --warningsAsErrors true
135+ docfx-net10-binaries/ docfx docfx.json --warningsAsErrors true
133136 Copy-Item CNAME _site/CNAME
134137 Copy-Item home/*.html _site/
135138 Copy-Item home/*.ico _site/
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ api/*.yml
33api /.manifest
44request-examples /* .json
55request-examples /* .temp
6+ docfx-net10-binaries /
Original file line number Diff line number Diff line change @@ -15,6 +15,16 @@ $PSNativeCommandUseErrorActionPreference = $true
1515# Workaround for bug at https://github.com/PowerShell/PowerShell/issues/23875#issuecomment-2672336383
1616$PSDefaultParameterValues [' Remove-Item:ProgressAction' ] = ' SilentlyContinue'
1717
18+ function EnsureDocfxBinaries () {
19+ # Temporary workaround until a proper DocFX build supporting .NET 10 is available.
20+ $zipFile = [IO.Path ]::Combine($env: TEMP , ' docfx-net10-binaries.zip' )
21+
22+ if (! (Test-Path - Path ' docfx-net10-binaries' )) {
23+ Invoke-WebRequest - Uri ' https://github.com/json-api-dotnet/docfx/raw/refs/heads/dotnet10-rtm/net10-binaries.zip' - Method ' GET' - OutFile $zipFile
24+ Expand-Archive $zipFile - Force
25+ }
26+ }
27+
1828function EnsureHttpServerIsInstalled {
1929 if ((Get-Command " npm" - ErrorAction SilentlyContinue) -eq $null ) {
2030 throw " Unable to find npm in your PATH. please install Node.js first."
@@ -45,6 +55,7 @@ function EnsureHttpServerIsInstalled {
4555 }
4656}
4757
58+ EnsureDocfxBinaries
4859EnsureHttpServerIsInstalled
4960
5061if (-Not $NoBuild -Or -Not (Test-Path - Path _site)) {
@@ -58,7 +69,7 @@ if (-Not $NoBuild -Or -Not (Test-Path -Path _site)) {
5869dotnet tool restore
5970
6071$env: DOCFX_SOURCE_BRANCH_NAME = " dev"
61- dotnet docfx docfx.json -- warningsAsErrors true
72+ docfx - net10 - binaries / docfx docfx.json -- warningsAsErrors true
6273
6374Copy-Item - Force home/* .html _site/
6475Copy-Item - Force home/* .ico _site/
You can’t perform that action at this time.
0 commit comments