-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
80 lines (63 loc) · 2.01 KB
/
gh-pages.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: github-pages
on:
push:
branches: [ main, release/* ]
pull_request:
branches: [ main, release/* ]
workflow_dispatch:
permissions:
contents: read
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Lint Markdown files
uses: DavidAnson/markdownlint-cli2-action@db43aef879112c3119a410d69f66701e0d530809 # v17.0.0
with:
config: '.markdownlint.json'
globs: |
**/*.md
!**/BenchmarkDotNet.Artifacts/**/*.md
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@7ff888c45ba73d66b3a180963706715897f41684 # v0.43.0
with:
config_path: .github/spellcheck.yml
- name: Setup .NET SDK
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
- name: Generate documentation
run: |
dotnet tool restore
dotnet build --configuration Release /p:SKIP_POLLY_ANALYZERS=true
dotnet docfx docs/docfx.json
- name: Publish documentation
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: docs
path: docs/_site
if-no-files-found: error
publish-docs:
needs: [ build-docs ]
runs-on: ubuntu-latest
if: |
github.event.repository.fork == false &&
github.ref_name == github.event.repository.default_branch
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: write
pages: write
steps:
- name: Download documentation
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: docs
path: docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
cname: www.pollydocs.org