File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ci-docs
2
+
3
+ on :
4
+ push :
5
+ branches : main
6
+ pull_request :
7
+ branches : main
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : windows-2022
12
+ steps :
13
+ - name : Checkout
14
+
15
+
16
+ - name : Setup .NET
17
+ uses : actions/setup-dotnet@v4
18
+ with :
19
+ dotnet-version : ' 8.0.x'
20
+
21
+ - name : Install DocFX
22
+ run : dotnet tool update -g docfx
23
+
24
+ - name : Add DocFX to PATH
25
+ run : echo "${HOME}/.dotnet/tools" >> $GITHUB_PATH
26
+
27
+ - name : Build documentation
28
+ run : docfx docs/docfx.json
29
+
30
+ - name : Publish Documentation
31
+ env :
32
+ ACCESS_TOKEN : ${{ secrets.PAT_DOCS }}
33
+ BRANCH : gh-pages
34
+ DOCSFOLDER : artifacts/_site
35
+ shell : cmd
36
+ run : |
37
+ cd %DOCSFOLDER%
38
+ git init
39
+ git config --local user.name "%GITHUB_ACTOR%"
40
+ git config --local user.email "%GITHUB_ACTOR%@users.noreply.github.com"
41
+ git config --local core.autocrlf false
42
+ git add .
43
+ git commit -m "docs update from commit %GITHUB_SHA%"
44
+ git push --force https://%ACCESS_TOKEN%@github.com/%GITHUB_REPOSITORY%.git master:%BRANCH%
45
+ rmdir .git /S /Q
You can’t perform that action at this time.
0 commit comments