forked from GitTools/GitVersion
-
Notifications
You must be signed in to change notification settings - Fork 0
170 lines (165 loc) · 4.22 KB
/
Copy pathdocs.yml
File metadata and controls
170 lines (165 loc) · 4.22 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: Verify & Publish Docs
on:
workflow_dispatch:
push:
paths:
- docs/**
- package*.json
- markdownlint.json
- .remarkrc.yaml
- mkdocs.yml
- .github/workflows/docs.yml
pull_request:
paths:
- docs/**
- package*.json
- markdownlint.json
- .remarkrc.yaml
- mkdocs.yml
- .github/workflows/docs.yml
env:
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
jobs:
prepare:
name: Prepare Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
fail-fast: false
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Cache cake frosting
id: cache-cake
uses: actions/cache@v2.1.7
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Use cached tools
id: cache-tools
uses: actions/cache@v2.1.7
with:
path: tools
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Get npm cache directory
id: cache-node-dir
run: echo "::set-output name=dir::$(npm config get cache)"
-
name: Cache Node Modules
id: cache-node
uses: actions/cache@v2.1.7
with:
path: ${{ steps.cache-node-dir.outputs.dir }}
key: node-${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
restore-keys: node-${{ runner.os }}
-
name: Install .NET SDK 6.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
-
name: '[Prepare]'
if: steps.cache-cake.outputs.cache-hit != 'true'
run: dotnet build build/CI.sln --configuration=Release
validate:
name: Validates Html
needs: [prepare]
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Use cached cake frosting
id: cache-cake
uses: actions/cache@v2.1.7
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Use cached tools
id: cache-tools
uses: actions/cache@v2.1.7
with:
path: tools
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Install .NET SDK 6.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
-
name: '[Build Documentation]'
shell: pwsh
run: dotnet run/docs.dll --target=BuildDocs
-
name: '[HTMLProofer]'
uses: chabad360/htmlproofer@master
with:
directory: ./artifacts/docs/preview
arguments: --url-ignore /api/ --allow-hash-href --assume-extension --disable-external
-
name: Reviewdog Reporter
uses: haya14busa/action-cond@v1
id: reporter
with:
cond: ${{ github.event_name == 'pull_request' }}
if_true: github-pr-review
if_false: github-check
-
name: '[Remark Lint]'
uses: reviewdog/action-remark-lint@v5.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: ${{ steps.reporter.outputs.value }}
publish:
name: Publish docs
needs: [validate]
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Use cached cake frosting
id: cache-cake
uses: actions/cache@v2.1.7
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Use cached tools
id: cache-tools
uses: actions/cache@v2.1.7
with:
path: tools
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Install .NET SDK 6.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
-
name: '[Publish Documentation]'
if: ${{ github.event_name == 'push' }}
shell: pwsh
run: dotnet run/docs.dll --target=PublishDocs
-
name: '[Publish Documentation]'
if: ${{ github.event_name == 'workflow_dispatch' }}
shell: pwsh
run: dotnet run/docs.dll --target=PublishDocs --force