Skip to content

Commit

Permalink
Configure GitHub Pages workflow for docfx
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanGreve committed Jul 16, 2024
1 parent f3f9ff4 commit c067456
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docs

on:
push:
branches:
- master
paths:
- AdvancedSystems.Core/**
- AdvancedSystems.Core.Abstractions/**
- docs/**
- .github/workflows/docs.yml
pull_request:
branches:
- master
paths:
- docs/**
- .github/workflows/docs.yml
workflow_dispatch:

jobs:
generate-docs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Setup DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx

- name: DocFX Build
working-directory: docs
run: docfx .\docfx.json
continue-on-error: false

- name: Publish
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true

0 comments on commit c067456

Please sign in to comment.