Skip to content

generate branch

generate branch #6

Workflow file for this run

name: Generate Markdown Documentation
on:
push:
branches:
- doc # adjust if your default branch is different
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x # adjust to the compatible .NET version for docfx
- name: Install DocFx
run: dotnet tool install --global docfx
- name: Generate Markdown Documentation
run: |
export PATH="$PATH:/home/runner/.dotnet/tools"
docfx docfx.json
- name: Ensure branch exists
run: |
git fetch
git checkout ${{ github.ref }}
git checkout -b docs || git checkout docs
# Optional: Push Generated Documentation to Repository
- name: Push Generated Documentation to Repository
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'Update generated markdown documentation'
branch: 'docs' # change to your preference
file_pattern: _site/markdown/* # or wherever your markdown docs are generated