Skip to content

Commit 9cd3c8e

Browse files
authored
Create docs.yml
1 parent 5cc494c commit 9cd3c8e

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- docs/**
9+
pull_request:
10+
branches:
11+
- main
12+
paths:
13+
- docs/**
14+
15+
jobs:
16+
generate-docs:
17+
18+
runs-on: windows-latest
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Setup .NET
24+
uses: actions/setup-dotnet@v1
25+
with:
26+
dotnet-version: 3.1.x
27+
28+
- name: Setup DocFX
29+
uses: crazy-max/ghaction-chocolatey@v1
30+
with:
31+
args: install docfx
32+
33+
- name: DocFX Build
34+
working-directory: docs
35+
run: docfx .\docfx.json
36+
continue-on-error: false
37+
38+
- name: Publish
39+
if: github.event_name == 'push'
40+
uses: peaceiris/actions-gh-pages@v3
41+
with:
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
publish_dir: docs/_site
44+
force_orphan: true

0 commit comments

Comments
 (0)