Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 239e71b

Browse files
authored
Fix + simplify docs publishing
1. Run on ubuntu, there's no reason (I think) to run on windows. 2. First install SDK for both F# and formatting, to avoid blocking, then build. 3. Avoid additional restore step and tools restoring for F# repo, since they're not really needed.
1 parent 949ef2b commit 239e71b

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

.github/workflows/docs.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@ on:
1212
env:
1313
FSHARP_DIR: fsharp
1414
FSF_DIR: FSharp.Formatting
15-
15+
BUILDING_USING_DOTNET: true
1616

1717
jobs:
1818
build:
19-
strategy:
20-
matrix:
21-
os: [windows-latest]
22-
runs-on: ${{ matrix.os }}
23-
19+
runs-on: ubuntu-latest
2420
steps:
2521
- uses: actions/checkout@v3
2622
- name: Checkout fsharp main
@@ -29,32 +25,28 @@ jobs:
2925
repository: dotnet/fsharp
3026
path: ${{ env.FSHARP_DIR }}
3127
ref: main
32-
- name: Setup .NET Core for FSharp
33-
uses: actions/setup-dotnet@v3
34-
with:
35-
global-json-file: ${{ env.FSHARP_DIR }}/global.json
36-
- name: Restore tools
37-
run: dotnet tool restore
38-
- name: Restore projects
39-
run: dotnet restore FSharp.Core\FSharp.Core.fsproj
40-
- name: Build FSharp.Core in fsharp main
41-
run: dotnet build .\src\FSharp.Core\ /p:BUILDING_USING_DOTNET=true
42-
working-directory: ${{ env.FSHARP_DIR }}
4328
- name: Checkout FSharp.Formatting main
4429
uses: actions/checkout@v3
4530
with:
4631
repository: fsprojects/FSharp.Formatting
4732
path: ${{ env.FSF_DIR }}
4833
ref: main
49-
- name: Setup .NET Core for FSharp.Formatting
34+
- name: Setup .NET for FSharp
35+
uses: actions/setup-dotnet@v3
36+
with:
37+
global-json-file: ${{ env.FSHARP_DIR }}/global.json
38+
- name: Setup .NET for FSharp.Formatting
5039
uses: actions/setup-dotnet@v3
5140
with:
5241
global-json-file: ${{ env.FSF_DIR }}/global.json
42+
- name: Build FSharp.Core in fsharp main
43+
run: dotnet build --restore src/FSharp.Core/FSharp.Core.fsproj
44+
working-directory: ${{ env.FSHARP_DIR }}
5345
- name: Build FSharp.Formatting main
54-
run: .\build -t Build
46+
run: dotnet fsi ./build.fsx -t Build
5547
working-directory: ${{ env.FSF_DIR }}
5648
- name: Run fsdocs
57-
run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net6.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }}
49+
run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }}
5850
- name: Deploy
5951
uses: peaceiris/actions-gh-pages@v3
6052
with:

0 commit comments

Comments
 (0)