Skip to content

Commit ce204b9

Browse files
authored
Merge pull request #1100 from Inxton/chore/docs-after-dev
ci: run docs build+deploy inside dev workflow
2 parents e61c50e + 4c365fd commit ce204b9

File tree

5 files changed

+77
-104
lines changed

5 files changed

+77
-104
lines changed

.github/workflows/dev.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: dev
22
permissions:
33
contents: read
4+
pages: write
5+
id-token: write
6+
7+
concurrency:
8+
group: "pages"
9+
cancel-in-progress: false
410

511
on:
612
# push:
@@ -53,3 +59,35 @@ jobs:
5359
dotnet run --project cake/Build.csproj --do-publish-only --do-publish --do-publish-release
5460
"PACK_EXIT_CODE=$LASTEXITCODE" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
5561
shell: pwsh
62+
63+
docs:
64+
needs: build
65+
runs-on: [self-hosted, Windows, X64, L2, AX]
66+
steps:
67+
- name: Generate ctrl API metadata (ixd)
68+
shell: pwsh
69+
run: .\scripts\_invoke_ixd.ps1
70+
71+
- name: Docfx metadata
72+
shell: pwsh
73+
run: dotnet docfx metadata .\docfx\docfx.json
74+
75+
- name: Docfx build
76+
shell: pwsh
77+
run: dotnet docfx build .\docfx\docfx.json --output .\docs\
78+
79+
- name: Upload Pages artifact
80+
uses: actions/upload-pages-artifact@v3
81+
with:
82+
path: docs
83+
84+
deploy:
85+
needs: docs
86+
runs-on: [self-hosted, Windows, X64, L2, AX]
87+
environment:
88+
name: github-pages
89+
url: ${{ steps.deployment.outputs.page_url }}
90+
steps:
91+
- name: Deploy to GitHub Pages
92+
id: deployment
93+
uses: actions/deploy-pages@v4

.github/workflows/docs.yml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
name: docs
22

33
on:
4-
push:
5-
branches: [ "dev" ]
6-
paths:
7-
- 'src/**'
8-
- 'docfx/**'
9-
- 'scripts/_build_documentation.ps1'
10-
- '.github/workflows/docs.yml'
114
workflow_dispatch:
125

136
permissions:
@@ -30,39 +23,7 @@ jobs:
3023

3124
- name: Generate ctrl API metadata (ixd)
3225
shell: pwsh
33-
run: |
34-
dotnet ixd `
35-
-x .\src\abstractions\ctrl `
36-
.\src\core\ctrl `
37-
.\src\data\ctrl `
38-
.\src\inspectors\ctrl `
39-
.\src\io\ctrl `
40-
.\src\probers\ctrl `
41-
.\src\simatic1500\ctrl `
42-
.\src\timers\ctrl `
43-
.\src\utils\ctrl `
44-
.\src\components.abstractions\ctrl `
45-
.\src\components.abb.robotics\ctrl `
46-
.\src\components.balluff.identification\ctrl `
47-
.\src\components.cognex.vision\ctrl `
48-
.\src\components.desoutter.tightening\ctrl `
49-
.\src\components.drives\ctrl `
50-
.\src\components.dukane.welders\ctrl `
51-
.\src\components.elements\ctrl `
52-
.\src\components.festo.drives\ctrl `
53-
.\src\components.keyence.vision\ctrl `
54-
.\src\components.kuka.robotics\ctrl `
55-
.\src\components.mitsubishi.robotics\ctrl `
56-
.\src\components.pneumatics\ctrl `
57-
.\src\components.rexroth.drives\ctrl `
58-
.\src\components.rexroth.press\ctrl `
59-
.\src\components.rexroth.tightening\ctrl `
60-
.\src\components.robotics\ctrl `
61-
.\src\components.siem.communication\ctrl `
62-
.\src\components.siem.identification\ctrl `
63-
.\src\components.ur.robotics\ctrl `
64-
.\src\components.zebra.vision\ctrl `
65-
-o .\docfx\apictrl\
26+
run: .\scripts\_invoke_ixd.ps1
6627

6728
- name: Docfx metadata
6829
shell: pwsh

scripts/_build_documentation.ps1

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,4 @@
1-
dotnet ixd `
2-
-x .\src\abstractions\ctrl `
3-
.\src\core\ctrl `
4-
.\src\data\ctrl `
5-
.\src\inspectors\ctrl `
6-
.\src\io\ctrl `
7-
.\src\probers\ctrl `
8-
.\src\simatic1500\ctrl `
9-
.\src\timers\ctrl `
10-
.\src\utils\ctrl `
11-
.\src\components.abstractions\ctrl `
12-
.\src\components.abb.robotics\ctrl `
13-
.\src\components.balluff.identification\ctrl `
14-
.\src\components.cognex.vision\ctrl `
15-
.\src\components.desoutter.tightening\ctrl `
16-
.\src\components.drives\ctrl `
17-
.\src\components.dukane.welders\ctrl `
18-
.\src\components.elements\ctrl `
19-
.\src\components.festo.drives\ctrl `
20-
.\src\components.keyence.vision\ctrl `
21-
.\src\components.kuka.robotics\ctrl `
22-
.\src\components.mitsubishi.robotics\ctrl `
23-
.\src\components.pneumatics\ctrl `
24-
.\src\components.rexroth.drives\ctrl `
25-
.\src\components.rexroth.press\ctrl `
26-
.\src\components.rexroth.tightening\ctrl `
27-
.\src\components.robotics\ctrl `
28-
.\src\components.siem.communication\ctrl `
29-
.\src\components.siem.identification\ctrl `
30-
.\src\components.ur.robotics\ctrl `
31-
.\src\components.zebra.vision\ctrl `
32-
-o .\docfx\apictrl\
1+
& "$PSScriptRoot\_invoke_ixd.ps1"
332

343
# Generate metadata (.NET API documentation) from C# projects
354
dotnet docfx metadata .\docfx\docfx.json

scripts/_invoke_ixd.ps1

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
param(
2+
[string]$Output = ".\docfx\apictrl\"
3+
)
4+
5+
dotnet ixd `
6+
-x .\src\abstractions\ctrl `
7+
.\src\core\ctrl `
8+
.\src\data\ctrl `
9+
.\src\inspectors\ctrl `
10+
.\src\io\ctrl `
11+
.\src\probers\ctrl `
12+
.\src\simatic1500\ctrl `
13+
.\src\timers\ctrl `
14+
.\src\utils\ctrl `
15+
.\src\components.abstractions\ctrl `
16+
.\src\components.abb.robotics\ctrl `
17+
.\src\components.balluff.identification\ctrl `
18+
.\src\components.cognex.vision\ctrl `
19+
.\src\components.desoutter.tightening\ctrl `
20+
.\src\components.drives\ctrl `
21+
.\src\components.dukane.welders\ctrl `
22+
.\src\components.elements\ctrl `
23+
.\src\components.festo.drives\ctrl `
24+
.\src\components.keyence.vision\ctrl `
25+
.\src\components.kuka.robotics\ctrl `
26+
.\src\components.mitsubishi.robotics\ctrl `
27+
.\src\components.pneumatics\ctrl `
28+
.\src\components.rexroth.drives\ctrl `
29+
.\src\components.rexroth.press\ctrl `
30+
.\src\components.rexroth.tightening\ctrl `
31+
.\src\components.robotics\ctrl `
32+
.\src\components.siem.communication\ctrl `
33+
.\src\components.siem.identification\ctrl `
34+
.\src\components.ur.robotics\ctrl `
35+
.\src\components.zebra.vision\ctrl `
36+
-o $Output

scripts/build_test_docu.ps1

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,4 @@
1-
dotnet ixd `
2-
-x .\src\abstractions\ctrl `
3-
.\src\core\ctrl `
4-
.\src\data\ctrl `
5-
.\src\inspectors\ctrl `
6-
.\src\io\ctrl `
7-
.\src\probers\ctrl `
8-
.\src\simatic1500\ctrl `
9-
.\src\timers\ctrl `
10-
.\src\utils\ctrl `
11-
.\src\components.abstractions\ctrl `
12-
.\src\components.abb.robotics\ctrl `
13-
.\src\components.balluff.identification\ctrl `
14-
.\src\components.cognex.vision\ctrl `
15-
.\src\components.desoutter.tightening\ctrl `
16-
.\src\components.drives\ctrl `
17-
.\src\components.dukane.welders\ctrl `
18-
.\src\components.elements\ctrl `
19-
.\src\components.festo.drives\ctrl `
20-
.\src\components.keyence.vision\ctrl `
21-
.\src\components.kuka.robotics\ctrl `
22-
.\src\components.mitsubishi.robotics\ctrl `
23-
.\src\components.pneumatics\ctrl `
24-
.\src\components.rexroth.drives\ctrl `
25-
.\src\components.rexroth.press\ctrl `
26-
.\src\components.rexroth.tightening\ctrl `
27-
.\src\components.robotics\ctrl `
28-
.\src\components.siem.communication\ctrl `
29-
.\src\components.siem.identification\ctrl `
30-
.\src\components.ur.robotics\ctrl `
31-
.\src\components.zebra.vision\ctrl `
32-
-o .\docfx\apictrl\
1+
& "$PSScriptRoot\_invoke_ixd.ps1"
332

343
if ((Test-Path .\docs-test\)) {
354
del .\docs-test\

0 commit comments

Comments
 (0)