mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-28 00:38:00 +01:00
Try 3 - Fixes #1745 - Github action to generate API docs
This commit is contained in:
42
.github/workflows/api-docs.yml
vendored
42
.github/workflows/api-docs.yml
vendored
@@ -5,16 +5,44 @@ on:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
generate-docs:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
# ...
|
||||
- name: Use docfx to build API Docs
|
||||
uses: nikeee/docfx-action@v1.0.0
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
args: docfx/docfx.json
|
||||
dotnet-version: 6.0.100
|
||||
|
||||
- name: Setup DocFX
|
||||
uses: crazy-max/ghaction-chocolatey@v1
|
||||
with:
|
||||
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/docfx-action@v1.0.0
|
||||
# with:
|
||||
# args: docfx/docfx.json
|
||||
|
||||
# # Publish generated site using GitHub Pages
|
||||
# - uses: maxheld83/ghpages@master
|
||||
|
||||
Reference in New Issue
Block a user