Skip to content

Build Docs

Build Docs #1

Workflow file for this run

name: Build Docs
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Install DocFX
run: dotnet tool install -g docfx
- name: Update docfx.json with GitHub Pages URL
env:
url: ${{ steps.deployment.outputs.page_url }}
run: |
sed -i "s|\$url|$url|g" docs/docfx.json
- name: Build the documentation
run: |
cd docs/
docfx
- name: Deploy to GitHub Pages
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: _site
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4