Skip to content

Add docfx workflow

Add docfx workflow #1

Workflow file for this run

# SPDX-FileCopyrightText: Public Domain
# SPDX-License-Identifier: CC0-1.0
name: API Docs
on:
push:
paths:
- 'lib/**/*.cs'
- 'docfx.json'
- '.github/workflows/docfx.yml'
permissions:
actions: read
pages: write
id-token: write
jobs:
publish-docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Generate docs
run: |
dotnet tool update -g docfx
dotnet restore
docfx
env:
DOCFX_SOURCE_BRANCH_NAME: ${{ github.ref_name }}
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4