|
@@ -5,16 +5,44 @@ on:
|
|
branches: [main]
|
|
branches: [main]
|
|
|
|
|
|
jobs:
|
|
jobs:
|
|
- build:
|
|
|
|
- runs-on: ubuntu-latest
|
|
|
|
|
|
+ generate-docs:
|
|
|
|
+ runs-on: windows-latest
|
|
|
|
|
|
steps:
|
|
steps:
|
|
- - uses: actions/checkout@v1
|
|
|
|
- # ...
|
|
|
|
- - name: Use docfx to build API Docs
|
|
|
|
- uses: nikeee/[email protected]
|
|
|
|
|
|
+ - name: Checkout
|
|
|
|
+ uses: actions/checkout@v2
|
|
|
|
+
|
|
|
|
+ - name: Setup .NET Core
|
|
|
|
+ uses: actions/setup-dotnet@v1
|
|
|
|
+ with:
|
|
|
|
+ dotnet-version: 6.0.100
|
|
|
|
+
|
|
|
|
+ - name: Setup DocFX
|
|
|
|
+ uses: crazy-max/ghaction-chocolatey@v1
|
|
with:
|
|
with:
|
|
- args: docfx/docfx.json
|
|
|
|
|
|
+ args: install docfx
|
|
|
|
+
|
|
|
|
+ - name: Install dependencies
|
|
|
|
+ run: dotnet restore
|
|
|
|
+
|
|
|
|
+ - name: DocFX Build
|
|
|
|
+ working-directory: docfx
|
|
|
|
+ run: del ../docs /F /S
|
|
|
|
+ run: docfx docfx.json
|
|
|
|
+ continue-on-error: false
|
|
|
|
+
|
|
|
|
+ - name: Publish
|
|
|
|
+ if: github.event_name == 'push'
|
|
|
|
+ uses: peaceiris/actions-gh-pages@v3
|
|
|
|
+ with:
|
|
|
|
+ github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
+ publish_dir: docs
|
|
|
|
+ force_orphan: true
|
|
|
|
+
|
|
|
|
+ # - name: Use docfx to build API Docs
|
|
|
|
+ # uses: nikeee/[email protected]
|
|
|
|
+ # with:
|
|
|
|
+ # args: docfx/docfx.json
|
|
|
|
|
|
# # Publish generated site using GitHub Pages
|
|
# # Publish generated site using GitHub Pages
|
|
# - uses: maxheld83/ghpages@master
|
|
# - uses: maxheld83/ghpages@master
|