Skip to content

Merge pull request #9 from codingthunder/making-docs #2

Merge pull request #9 from codingthunder/making-docs

Merge pull request #9 from codingthunder/making-docs #2

Workflow file for this run

name: Generate Documentation
on:
push:
branches:
- master # Run on every push to master, adjust as needed
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up .NET SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.x' # Ensure compatibility with DocFX
- name: Install DocFX
run: |
wget https://github.com/dotnet/docfx/releases/download/v2.58/docfx.zip
unzip docfx.zip -d docfx
- name: Locate DocFX Path
id: locate_docfx
run: |
DOCFX_PATH=$(find $GITHUB_WORKSPACE -name "docfx" -type f -executable | head -n 1)
echo "DOCFX_PATH=$DOCFX_PATH" >> $GITHUB_ENV
- name: Generate Documentation
run: |
$DOCFX_PATH docfx_project/docfx.json
- name: Publish to GitHub Wiki
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.DOCS_TOKEN }}
publish_dir: docfx_project/site
publish_branch: 'wiki' # Pushes directly to the wiki branch