Skip to content

Commit 6248e31

Browse files
committed
(build) preapre, validate and publish docs stages added
1 parent dc961e6 commit 6248e31

File tree

1 file changed

+80
-23
lines changed

1 file changed

+80
-23
lines changed

.github/workflows/docs.yml

+80-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Verify & Publish Documentation
1+
name: Verify & Publish Docs
22

33
on:
44
workflow_dispatch:
@@ -9,11 +9,14 @@ on:
99
paths:
1010
- 'docs/**'
1111
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+
1720
steps:
1821
-
1922
name: Checkout
@@ -24,28 +27,82 @@ jobs:
2427
uses: actions/[email protected]
2528
with:
2629
path: run
27-
key: run-docs-${{ runner.os }}-${{ hashFiles('./build/**') }}
30+
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
2831
-
2932
name: '[Prepare]'
3033
if: steps.cache-cake.outputs.cache-hit != 'true'
3134
run: dotnet build build/CI.sln --configuration=Release
32-
# -
33-
# name: '[Build Documentation]'
34-
# shell: pwsh
35-
# run: dotnet run/docs.dll --target=BuildDocs
3635

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+
uses: actions/[email protected]
51+
with:
52+
path: run
53+
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
54+
-
55+
name: Use cached tools
56+
id: cache-tools
57+
uses: actions/[email protected]
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+
uses: actions/[email protected]
96+
with:
97+
path: run
98+
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
99+
-
100+
name: Use cached tools
101+
id: cache-tools
102+
uses: actions/[email protected]
103+
with:
104+
path: tools
105+
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
49106
-
50107
name: '[Publish Documentation]'
51108
if: ${{ github.event_name == 'push' }}

0 commit comments

Comments
 (0)