Skip to content

Commit 88026ab

Browse files
committed
ci: replace docfx build from container to docfx command
1 parent 95998ff commit 88026ab

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

.config/dotnet-tools.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"docfx": {
6+
"version": "2.78.3",
7+
"commands": [
8+
"docfx"
9+
],
10+
"rollForward": false
11+
}
12+
}
13+
}

.github/workflows/build-docs.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- master
77
- feature/docs
8+
pull_request:
9+
branches:
10+
- master
811

912
jobs:
1013
run-docfx:
@@ -19,15 +22,15 @@ jobs:
1922
with:
2023
repository: Cysharp/DocfxTemplate
2124
path: docs/_DocfxTemplate
22-
- uses: Kirbyrawr/docfx-action@db9a22c8fe1e8693a2a21be54cb0b87dfaa72cc4
23-
name: Docfx metadata
24-
with:
25-
args: metadata docs/docfx.json
26-
- uses: Kirbyrawr/docfx-action@db9a22c8fe1e8693a2a21be54cb0b87dfaa72cc4
27-
name: Docfx build
28-
with:
29-
args: build docs/docfx.json
25+
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
26+
- name: dotnet tool restore
27+
run: dotnet tool restore
28+
- name: Docfx metadata
29+
run: dotnet docfx metadata docs/docfx.json
30+
- name: Docfx build
31+
run: dotnet docfx build docs/docfx.json
3032
- name: Publish to GitHub Pages
33+
if: ${{ github.event_name != 'pull_request' }}
3134
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
3235
with:
3336
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)