Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
78 lines (69 loc) · 2.49 KB
/
Copy pathaction.yml
File metadata and controls
78 lines (69 loc) · 2.49 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
74
75
76
77
78
name: "DocFX Setup"
description: ""
inputs:
github-token:
description: ''
default: ''
docs-directory:
description: ''
default: '$PWD/docs'
docfx-version:
description: 'DocFX to install. The bundled LastModified plugin is compiled against this same version.'
default: '2.78.5'
newtonsoftjson-version:
description: ''
default: '13.0.1'
runs:
using: "composite"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Setup .NET 8
uses: actions/setup-dotnet@master
with:
dotnet-version: 8.x.x
- name: Setup BUTR GPR
uses: actions/setup-dotnet@master
with:
source-url: https://nuget.pkg.github.com/BUTR/index.json
env:
NUGET_AUTH_TOKEN: ${{inputs.github-token}}
- name: Generating Newtonsoft.Json xref maps
run: >-
dotnet run --project ${{ github.action_path }}/build/SandcastleXrefGenerator -- `
Newtonsoft.Json ${{inputs.newtonsoftjson-version}} netstandard2.0 `
https://www.newtonsoft.com/json/help/html/ `
${{inputs.docs-directory}}/xrefs/Newtonsoft.Json-xrefmap.yml
shell: pwsh
- name: Build DocFx.Plugin.LastModified
# -p:DocfxVersion ties the plugin's Docfx.Plugins reference to the docfx
# installed above. They have to match: docfx resolves IPostProcessor
# against its own copy, and a mismatch is not an error, just a skipped
# plugin and a docs build that still goes green.
run: dotnet publish ${{ github.action_path }}/build/DocFx.Plugin.LastModified --configuration Release -p:DocfxVersion=${{inputs.docfx-version}} --output ${{inputs.docs-directory}}/_template/last-modified/plugins;
shell: pwsh
# When a custom fork is needed
# - uses: actions/checkout@v3
# with:
# repository: BUTR/docfx
# path: _actions_docfx
# - uses: actions/setup-node@v4
# with:
# node-version: 16
# - run: npm install
# working-directory: _actions_docfx/templates
# shell: pwsh
# - run: npm run build
# working-directory: _actions_docfx/templates
# shell: pwsh
# - run: dotnet pack _actions_docfx/src/docfx -c Release -o _actions_docfx/drop/nuget
# shell: pwsh
# - run: dotnet tool update --global docfx
# working-directory: _actions_docfx
# shell: pwsh
- name: Install DocFX
run: dotnet tool update -g docfx --version ${{inputs.docfx-version}}
shell: pwsh