DocFX update #201
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DocFX | |
on: | |
push: | |
branches: | |
#- master | |
# documentation will cover the dev branch for now | |
- dev | |
- dev-docs | |
paths: | |
- '.github/workflows/docfx.yml' | |
- 'src/Bannerlord.UIExtenderEx/**.cs' | |
- 'docs/**' | |
- 'README.md' | |
env: | |
# Disable the .NET logo in the console output. | |
DOTNET_NOLOGO: true | |
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build. | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
# Disable sending .NET CLI telemetry to Microsoft. | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
docfx: | |
name: DocFX Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: DocFX Setup | |
uses: butr/actions-docfx-setup@v3 | |
with: | |
docfx-version: 2.74.1 | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
- name: Build Bannerlord.UIExtenderEx | |
run: dotnet build src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj; | |
shell: pwsh | |
- name: Run DocFX | |
run: >- | |
Copy-Item "README.md" -Destination "docs/index.md"; | |
New-Item -Type dir "docs/images"; | |
Copy-Item "resources/BUTR48.svg" -Destination "docs/images/BUTR48.svg"; | |
docfx docs/docfx.json; | |
shell: pwsh | |
- name: Deploy DocFX | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: docs/_site | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |