-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (65 loc) · 1.87 KB
/
Copy pathci.yml
File metadata and controls
73 lines (65 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_VERSION: 9.0.101
NUGET_API_KEY: ${{ secrets.NUGET_KEY }}
# Kill other jobs when we trigger this workflow by sending new commits
# to the PR.
# https://stackoverflow.com/a/72408109
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
# workaround for https://github.com/actions/runner/issues/2033
- name: ownership workaround
run: git config --global --add safe.directory '*'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Run ci script quickly
run: dotnet run publish --nuget-api-key ${{ env.NUGET_API_KEY }} --parallel
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore tools
run: dotnet tool restore
- name: Build slnx
run: dotnet build -c Release docs.slnx
- name: Generate documentation
run: dotnet fsdocs build --properties Configuration=Release
- name: Upload documentation
uses: actions/upload-pages-artifact@v4
with:
path: ./output
deploy:
runs-on: ubuntu-latest
needs: build-docs
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4