-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.15 KB
/
dotnet.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: |
cd src
dotnet restore
- name: generate docfx site
run: |
dotnet tool install -g docfx
docfx init -y
# override default config, toc, and index page
cp .docfx/* .
cp README.md index.md
docfx docfx.json
ls -alh _site
- name: push site to gh-pages
run: |
git config --global user.name 'Miha Zidar'
git config --global user.email '[email protected]'
git checkout -B gh-pages
mv _site .git/
rm -rf *
mv .git/_site/* .
git add .
git commit -am "Automated github page generation"
git push origin gh-pages -f