-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (93 loc) · 3 KB
/
docs.yml
File metadata and controls
114 lines (93 loc) · 3 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Generate Documentation
on:
push:
branches: [ master ]
paths:
- 'Documentation/**'
- 'DirectOutput/**'
- 'DocumentationHelper/**'
- 'DoxygenConfig/**'
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-docs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Install Doxygen
run: |
choco install doxygen.install graphviz
- name: Restore NuGet packages
run: |
nuget restore DirectOutput.sln
- name: Build DirectOutput (to generate XML docs)
run: |
msbuild DirectOutput/DirectOutput.csproj /p:Configuration=Debug /p:Platform=x86
- name: Copy XML documentation to expected location
run: |
mkdir -Force "bin\Release"
copy "bin\Debug\DirectOutput.xml" "bin\Release\DirectOutput.XML"
- name: Build DocumentationHelper
run: |
msbuild DocumentationHelper/DocumentationHelper.csproj /p:Configuration=Release /p:Platform=x86
- name: Generate dynamic documentation files
run: |
cd bin/Release
./DocumentationHelper.exe
- name: Generate documentation with Doxygen
timeout-minutes: 10
run: |
cd DoxygenConfig
& "C:\Program Files\doxygen\bin\doxygen.exe" DoxygenConfigFile_GitHubActions
- name: Verify documentation generated
run: |
if (Test-Path "DirectOutput_Docu") {
echo "Documentation generated successfully"
echo "Generated files:"
Get-ChildItem "DirectOutput_Docu" -Recurse -Name | Select-Object -First 10
} else {
echo "DirectOutput_Docu directory not found"
exit 1
}
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './DirectOutput_Docu'
deploy:
runs-on: ubuntu-latest
needs: build-docs
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: github-pages
path: ./docs-artifact
- name: Extract artifact
run: |
cd docs-artifact
tar -xf artifact.tar
- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs-artifact
force_orphan: true