Skip to content

Commit d50ee20

Browse files
committed
[增加]1. 增加Docfx 生成
1 parent 688a1ac commit d50ee20

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/docs-publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- "src"
7+
tags:
8+
- "*"
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup .NET Core
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: 8.0.x
23+
24+
- name: Install DocFX
25+
run: |
26+
dotnet tool install -g docfx
27+
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
28+
29+
- name: Build Documentation
30+
run: docfx build ./docs/docfx.json
31+
32+
- name: Deploy to GitHub Pages
33+
uses: peaceiris/actions-gh-pages@v3
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: ./docs/_site

0 commit comments

Comments
 (0)