-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (42 loc) · 1.2 KB
/
main.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
43
44
45
46
47
48
49
50
51
52
53
54
name: build
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: write
jobs:
build-test-document:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-restore --verbosity minimal
- name: Setup DocFX
run: |
wget https://github.com/dotnet/docfx/releases/download/v2.75.3/docfx-linux-x64-v2.75.3.zip -O docfx.zip
unzip docfx.zip -d docfx
- name: Generate Documentation
run: |
docfx/docfx docfx.json
- name: Prepare Docs for Deployment
run: |
mv ./docs/README.html ./docs/index.html
cp ICON.png ./docs/
cp LICENSE ./docs/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs