Skip to content

Commit

Permalink
Try 3 - Fixes #1745 - Github action to generate API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed Sep 16, 2022
1 parent 1011f4c commit fc1d7d4
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions .github/workflows/api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[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:
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
# - uses: maxheld83/ghpages@master
Expand Down

0 comments on commit fc1d7d4

Please sign in to comment.