ci: replace docfx build from container to docfx command

This commit is contained in:
Ikiru Yoshizaki
2025-09-10 17:09:28 +09:00
parent 95998ff3f2
commit 88026ab14a
2 changed files with 24 additions and 8 deletions

13
.config/dotnet-tools.json Normal file
View File

@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"docfx": {
"version": "2.78.3",
"commands": [
"docfx"
],
"rollForward": false
}
}
}

View File

@@ -5,6 +5,9 @@ on:
branches: branches:
- master - master
- feature/docs - feature/docs
pull_request:
branches:
- master
jobs: jobs:
run-docfx: run-docfx:
@@ -19,15 +22,15 @@ jobs:
with: with:
repository: Cysharp/DocfxTemplate repository: Cysharp/DocfxTemplate
path: docs/_DocfxTemplate path: docs/_DocfxTemplate
- uses: Kirbyrawr/docfx-action@db9a22c8fe1e8693a2a21be54cb0b87dfaa72cc4 - uses: Cysharp/Actions/.github/actions/setup-dotnet@main
name: Docfx metadata - name: dotnet tool restore
with: run: dotnet tool restore
args: metadata docs/docfx.json - name: Docfx metadata
- uses: Kirbyrawr/docfx-action@db9a22c8fe1e8693a2a21be54cb0b87dfaa72cc4 run: dotnet docfx metadata docs/docfx.json
name: Docfx build - name: Docfx build
with: run: dotnet docfx build docs/docfx.json
args: build docs/docfx.json
- name: Publish to GitHub Pages - name: Publish to GitHub Pages
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}