-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (55 loc) 路 1.69 KB
/
Copy pathdocs.yml
File metadata and controls
70 lines (55 loc) 路 1.69 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
name: Deploy documentation
on:
push:
branches:
- main
- wip
workflow_dispatch:
permissions:
contents: write
pages: write
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
deploy-docs:
name: Build and deploy documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24.x
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: '3.14'
- name: Install DocFX
run: dotnet tool install -g docfx
- name: Output API reference with DocFX
run: docfx metadata
- name: Download sanitization script
run: git clone https://gist.github.com/332889a0a46458470b0952dd039422e9.git ./gist-clone
- name: Sanitize DocFX for all frameworks
run: |
python ./gist-clone/sanitize-docfx-output.py ./docs/api/net10.0
python ./gist-clone/sanitize-docfx-output.py ./docs/api/net8.0
- name: Install Docusaurus
run: npm ci --ignore-scripts
- name: Build site with Docusaurus
run: npm run build
- name: Publish Docusaurus site
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build
force_orphan: true