Skip to content

Update dependencies + Build .NET 8 version (#706) #119

Update dependencies + Build .NET 8 version (#706)

Update dependencies + Build .NET 8 version (#706) #119

Workflow file for this run

name: Publish GH - Pages
on:
push:
branches: [ main, release/v2.2, release/v2.3 ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set Docs Locations
id: branch
run: |
$branchName = "${{ github.ref }}"
# refs/heads/ is 11 characters
$branchName = $branchName.Substring(11)
if($branchName.StartsWith("release/"))
{
$branchName = $branchName.Substring(8)
}
elseif ($branchName -eq "main")
{
$branchName = ""
}
echo "::set-output name=DOCS_LOCATION::$branchName"
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.x'
- name: Install chocolatey
run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- name: Install docfx
run: choco install docfx
- name: Run DocFx
run: docfx docfx/docfx.json
- name: Upload to GitHub Pages
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docfx/_site
destination_dir: ${{ steps.branch.outputs.DOCS_LOCATION }}
keep_files: true
full_commit_message: Deploy ${{ steps.branch.outputs.DOCS_LOCATION }} to GitHub Pages