1
- name : Verify & Publish Documentation
1
+ name : Verify & Publish Docs
2
2
3
3
on :
4
4
workflow_dispatch :
9
9
paths :
10
10
- ' docs/**'
11
11
jobs :
12
- build :
13
- runs-on : windows-latest
14
- env :
15
- GITHUB_TOKEN : ${{ secrets.RELEASE_GITHUB_TOKEN }}
16
- GITHUB_USERNAME : ${{ github.actor }}
12
+ prepare :
13
+ name : Prepare Build
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ matrix :
17
+ os : [windows-latest, ubuntu-latest]
18
+ fail-fast : false
19
+
17
20
steps :
18
21
-
19
22
name : Checkout
@@ -24,28 +27,82 @@ jobs:
24
27
25
28
with :
26
29
path : run
27
- key : run-docs- ${{ runner.os }}-${{ hashFiles('./build/**') }}
30
+ key : run-${{ runner.os }}-${{ hashFiles('./build/**') }}
28
31
-
29
32
name : ' [Prepare]'
30
33
if : steps.cache-cake.outputs.cache-hit != 'true'
31
34
run : dotnet build build/CI.sln --configuration=Release
32
- # -
33
- # name: '[Build Documentation]'
34
- # shell: pwsh
35
- # run: dotnet run/docs.dll --target=BuildDocs
36
35
37
- # -
38
- # name: '[HTMLProofer]'
39
- # uses: chabad360/htmlproofer@master
40
- # with:
41
- # directory: ./artifacts/docs/preview
42
- # arguments: --url-ignore /api/ --allow-hash-href --assume-extension --disable-external
43
- # -
44
- # name: '[Remark Lint]'
45
- # uses: reviewdog/action-remark-lint@v2
46
- # with:
47
- # github_token: ${{ secrets.GITHUB_TOKEN }}
48
- # reporter: github-pr-check
36
+ validate :
37
+ name : Validates Html
38
+ needs : [prepare]
39
+ runs-on : ubuntu-latest
40
+ steps :
41
+ -
42
+ name : Checkout
43
+ uses : actions/checkout@v2
44
+ -
45
+ name : Fetch all history for all tags and branches
46
+ run : git fetch --prune --unshallow
47
+ -
48
+ name : Use cached cake frosting
49
+ id : cache-cake
50
+
51
+ with :
52
+ path : run
53
+ key : run-${{ runner.os }}-${{ hashFiles('./build/**') }}
54
+ -
55
+ name : Use cached tools
56
+ id : cache-tools
57
+
58
+ with :
59
+ path : tools
60
+ key : tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
61
+ -
62
+ name : ' [Build Documentation]'
63
+ shell : pwsh
64
+ run : dotnet run/docs.dll --target=BuildDocs
65
+
66
+ -
67
+ name : ' [HTMLProofer]'
68
+ uses : chabad360/htmlproofer@master
69
+ with :
70
+ directory : ./artifacts/docs/preview
71
+ arguments : --url-ignore /api/ --allow-hash-href --assume-extension --disable-external
72
+ -
73
+ name : ' [Remark Lint]'
74
+ uses : reviewdog/action-remark-lint@v2
75
+ with :
76
+ github_token : ${{ secrets.GITHUB_TOKEN }}
77
+ reporter : github-pr-check
78
+ publish :
79
+ name : Publish docs
80
+ needs : [validate]
81
+ runs-on : windows-latest
82
+ env :
83
+ GITHUB_TOKEN : ${{ secrets.RELEASE_GITHUB_TOKEN }}
84
+ GITHUB_USERNAME : ${{ github.actor }}
85
+ steps :
86
+ -
87
+ name : Checkout
88
+ uses : actions/checkout@v2
89
+ -
90
+ name : Fetch all history for all tags and branches
91
+ run : git fetch --prune --unshallow
92
+ -
93
+ name : Use cached cake frosting
94
+ id : cache-cake
95
+
96
+ with :
97
+ path : run
98
+ key : run-${{ runner.os }}-${{ hashFiles('./build/**') }}
99
+ -
100
+ name : Use cached tools
101
+ id : cache-tools
102
+
103
+ with :
104
+ path : tools
105
+ key : tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
49
106
-
50
107
name : ' [Publish Documentation]'
51
108
if : ${{ github.event_name == 'push' }}
0 commit comments