-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (42 loc) · 1.27 KB
/
Copy pathdocs.yml
File metadata and controls
50 lines (42 loc) · 1.27 KB
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
name: Documentation
# Build the DocFX site and publish it to the gh-pages branch.
#
# Triggers:
# * Manually, from the Actions tab (workflow_dispatch).
# * Automatically, whenever a GitHub Release is published.
on:
workflow_dispatch:
release:
types: [published]
# Allow the job to push to the gh-pages branch.
permissions:
contents: write
# Never run two deployments at once; cancel an in-progress one.
concurrency:
group: pages
cancel-in-progress: true
jobs:
build-and-deploy:
name: Build and deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install DocFX
run: dotnet tool update -g docfx
- name: Build site
run: docfx docs/docfx.json
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: docs/_site
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'docs: publish site (${{ github.sha }})'