Skip to content

Merge pull request #319 from HumabHatterZed/main #199

Merge pull request #319 from HumabHatterZed/main

Merge pull request #319 from HumabHatterZed/main #199

Workflow file for this run

name: Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore Project
run: dotnet restore
- name: Add Mono Repository
run: |
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
- name: Install Mono
run: sudo apt install mono-runtime mono-devel msbuild
- name: Install DocFX
run: |
curl -LJ https://github.com/dotnet/docfx/releases/download/v2.59.0/docfx.zip -o docfx.zip
unzip -d docfx/ docfx.zip
- name: Generate documentation
run: mono docfx/docfx.exe docs/docfx.json
- uses: actions/checkout@v3
with:
ref: gh-pages
path: gh-pages
- name: Setup gh-pages folder
run: |
cd gh-pages
rm -rf $(ls -A | grep -v .git)
cp -R ../docs/_site/* .
- name: Push update
continue-on-error: true
run: |
cd gh-pages
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -a -m "Generated from ${{ github.event.head_commit.id }}"
git push