forked from neo-project/neo
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.16 KB
/
doc.yml
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
name: Generate Markdown Documentation
on:
push:
branches:
- doc # adjust if your default branch is different
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x # adjust to the compatible .NET version for docfx
- name: Install DocFx
run: dotnet tool install --global docfx
- name: Generate Markdown Documentation
run: |
export PATH="$PATH:/home/runner/.dotnet/tools"
docfx docfx.json
- name: Ensure branch exists
run: |
git fetch
git checkout ${{ github.ref }}
git checkout -b docs || git checkout docs
# Optional: Push Generated Documentation to Repository
- name: Push Generated Documentation to Repository
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'Update generated markdown documentation'
branch: 'docs' # change to your preference
file_pattern: _site/markdown/* # or wherever your markdown docs are generated