Skip to content

Commit cb3559f

Browse files
authored
Merge pull request #979 from nojaf/fix-docs
Update docs Action
2 parents a261178 + fd1dcbe commit cb3559f

2 files changed

Lines changed: 34 additions & 30 deletions

File tree

.github/workflows/docs.yml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,37 @@ on:
1212

1313
jobs:
1414
build:
15-
runs-on: windows-latest
15+
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
18-
- name: Setup .NET
19-
uses: actions/setup-dotnet@v3
20-
with:
21-
dotnet-version: 7.0.100
22-
- name: Restore tools
23-
run: dotnet tool restore
24-
- name: Restore projects
25-
run: dotnet restore FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj
26-
- name: Checkout fsharp master
27-
run: git clone https://github.com/dotnet/fsharp --depth 1 fsharp -b main
28-
- name: Build fsharp master (turn of CI build status)
29-
run: cd fsharp && eng\CIBuild.cmd -noVisualStudio
30-
- name: Run fsdocs
31-
run: dotnet fsdocs build --sourcefolder fsharp --input fsharp/docs
32-
- name: Deploy
33-
uses: peaceiris/actions-gh-pages@v3
34-
with:
35-
personal_token: ${{ secrets.GITHUB_TOKEN }}
36-
publish_dir: ./output
37-
publish_branch: gh-pages
38-
force_orphan: true
17+
- uses: actions/checkout@v3
18+
- name: Checkout fsharp main
19+
uses: actions/checkout@v3
20+
with:
21+
repository: dotnet/fsharp
22+
path: ${{ env.FSHARP_DIR }}
23+
ref: main
24+
- name: Setup .NET for FSharp
25+
uses: actions/setup-dotnet@v3
26+
with:
27+
global-json-file: ${{ env.FSHARP_DIR }}/global.json
28+
- name: Restore tools
29+
run: dotnet tool restore
30+
31+
- name: Build FCS
32+
run: dotnet build src/Compiler/FSharp.Compiler.Service.fsproj /p:BUILDING_USING_DOTNET=true
33+
working-directory: ${{ env.FSHARP_DIR }}
34+
35+
- name: Run fsdocs
36+
env:
37+
# allow roll forward to latest major version - this would happen for us if we invoked the fsdocs tool instead of invoking the binary directly
38+
DOTNET_ROLL_FORWARD: "LatestMajor"
39+
# need previews because .NET 8 is what's being used at runtime
40+
DOTNET_ROLL_FORWARD_TO_PRERELEASE: "1"
41+
run: dotnet fsdocs build --sourcefolder fsharp --input fsharp/docs
42+
- name: Deploy
43+
uses: peaceiris/actions-gh-pages@v3
44+
with:
45+
personal_token: ${{ secrets.GITHUB_TOKEN }}
46+
publish_dir: ./output
47+
publish_branch: gh-pages
48+
force_orphan: true

.github/workflows/pr.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ env:
1010

1111
jobs:
1212
build:
13-
14-
strategy:
15-
matrix:
16-
os: [ubuntu-latest]
17-
dotnet: [6.0.400]
18-
runs-on: ${{ matrix.os }}
19-
13+
runs-on: ubuntu-latest
2014
steps:
2115
- uses: actions/checkout@v3
2216
- name: Checkout fsharp main

0 commit comments

Comments
 (0)