Build Docs #1
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: 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 |