Skip to content

Merge pull request #141 from kocdigital/Feature/16740/18399/TRENSearc… #143

Merge pull request #141 from kocdigital/Feature/16740/18399/TRENSearc…

Merge pull request #141 from kocdigital/Feature/16740/18399/TRENSearc… #143

# Simple workflow for deploying static content to GitHub Pages
name: DocFX Build and Publish
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
generate-docs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Copy the Readmes
working-directory: ./
run: |
Copy-Item README.md docs\index.md
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
6.0.x
- name: Setup DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx
- name: Install dependencies & restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: DocFX Build
run: docfx docs/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/_site
force_orphan: true