Skip to content

Commit 3b5f31e

Browse files
authored
Create docs.yml
1 parent e436312 commit 3b5f31e

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/docs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Docs
2+
3+
on:
4+
# Runs on pushes targeting the default branch.
5+
push:
6+
branches: ["main"]
7+
8+
# Allows you to run this workflow manually from the Actions tab.
9+
workflow_dispatch:
10+
11+
jobs:
12+
generate-docs:
13+
14+
permissions:
15+
id-token: write
16+
pages: write
17+
18+
runs-on: windows-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup .NET 8
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: 8.0.x
27+
28+
- name: Update DocFX
29+
run: dotnet tool update -g docfx
30+
31+
- name: DocFX Build
32+
working-directory: docs
33+
run: docfx .\docfx.json
34+
continue-on-error: false
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: 'docs/_site'
40+
41+
- name: Deploy to GitHub Pages
42+
if: github.event_name == 'push'
43+
id: deployment
44+
uses: actions/deploy-pages@v4
45+
46+
# - name: Publish
47+
# if: github.event_name == 'push'
48+
# uses: peaceiris/actions-gh-pages@v3
49+
# with:
50+
# github_token: ${{ secrets.GITHUB_TOKEN }}
51+
# publish_dir: docs/_site
52+
# force_orphan: true

0 commit comments

Comments
 (0)