-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (47 loc) · 1.39 KB
/
docfx.yml
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
name: DocFX
on:
push:
branches:
#- master
# documentation will cover the dev branch for now
- dev
- dev-docs
paths:
- '.github/workflows/docfx.yml'
- 'src/Bannerlord.UIExtenderEx/**.cs'
- 'docs/**'
- 'README.md'
workflow_dispatch:
env:
# Disable the .NET logo in the console output.
DOTNET_NOLOGO: true
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending .NET CLI telemetry to Microsoft.
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
docfx:
name: DocFX Documentation
runs-on: ubuntu-latest
steps:
- name: DocFX Setup
uses: butr/actions-docfx-setup@v4
with:
github-token: ${{secrets.GITHUB_TOKEN}}
- name: Build Bannerlord.UIExtenderEx
run: dotnet build src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj;
shell: pwsh
- name: Run DocFX
run: >-
Copy-Item "README.md" -Destination "docs/index.md";
New-Item -Type dir "docs/images";
Copy-Item "resources/BUTR48.svg" -Destination "docs/images/BUTR48.svg";
docfx docs/docfx.json;
shell: pwsh
- name: Deploy DocFX
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: docs/_site
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}