Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 102 additions & 102 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,102 @@
name: Publish docs

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
actions: read
pages: write
id-token: write
pull-requests: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
validate-docs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
10.0.x

- name: Restore
run: dotnet restore JD.SemanticKernel.Extensions.slnx

- name: Install docfx
run: dotnet tool update -g docfx

- name: Build documentation
run: docfx docs/docfx.json

- name: Validate output
run: |
if [ ! -d "docs/_site" ]; then
echo "::error::Documentation build did not create _site directory"
exit 1
fi
HTML_COUNT=$(find docs/_site -name "*.html" | wc -l)
echo "Generated $HTML_COUNT HTML files"
if [ "$HTML_COUNT" -lt 1 ]; then
echo "::error::No HTML files were generated"
exit 1
fi
echo "::notice::Documentation validation passed! Generated $HTML_COUNT pages."

- name: Upload preview
uses: actions/upload-artifact@v7
with:
name: documentation-preview
path: docs/_site
retention-days: 7

publish-docs:
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
10.0.x

- name: Restore
run: dotnet restore JD.SemanticKernel.Extensions.slnx

- name: Install docfx
run: dotnet tool update -g docfx

- name: Build documentation
run: docfx docs/docfx.json

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: docs/_site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
name: Publish docs
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
actions: read
pages: write
id-token: write
pull-requests: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
validate-docs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
10.0.x
- name: Restore
run: dotnet restore JD.SemanticKernel.Extensions.slnx
- name: Install docfx
run: dotnet tool update -g docfx
- name: Build documentation
run: docfx docs/docfx.json
- name: Validate output
run: |
if [ ! -d "docs/_site" ]; then
echo "::error::Documentation build did not create _site directory"
exit 1
fi
HTML_COUNT=$(find docs/_site -name "*.html" | wc -l)
echo "Generated $HTML_COUNT HTML files"
if [ "$HTML_COUNT" -lt 1 ]; then
echo "::error::No HTML files were generated"
exit 1
fi
echo "::notice::Documentation validation passed! Generated $HTML_COUNT pages."
- name: Upload preview
uses: actions/upload-artifact@v7
with:
name: documentation-preview
path: docs/_site
retention-days: 7
publish-docs:
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
10.0.x
- name: Restore
run: dotnet restore JD.SemanticKernel.Extensions.slnx
- name: Install docfx
run: dotnet tool update -g docfx
- name: Build documentation
run: docfx docs/docfx.json
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: docs/_site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
Loading