Skip to content

Bump docfx from 2.77.0 to 2.78.2 #490

Bump docfx from 2.77.0 to 2.78.2

Bump docfx from 2.77.0 to 2.78.2 #490

Workflow file for this run

name: Build, test and deploy docs
env:
ACTIONS_RUNNER_NODE20: true
on:
push:
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Restore dependencies
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --no-build --verbosity minimal
coverlet:
needs: build-and-test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Install Coverlet
run: dotnet tool install --global coverlet.console
- name: Install ReportGenerator
run: dotnet tool install --global dotnet-reportgenerator-globaltool
- name: Build
run: dotnet build -c Release --verbosity quiet
- name: Generate test results using coverlet
run: coverlet tests/bin/Release/net8.0/tests.dll --target "dotnet" --targetargs "test -c Release --no-build --verbosity quiet" --format opencover --exclude-by-attribute 'Visual' --exclude-by-attribute 'Obsolete'
- name: Convert coverage report to lcov format
run: reportgenerator "-reports:./coverage.opencover.xml" "-targetdir:coverage" "-reporttypes:lcov"
- name: Coveralls upload
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.info
publish-docs:
needs: build-and-test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Build
run: dotnet build -c Release
- name: Install DocFX
run: dotnet tool update -g docfx
- name: Create docs
run: docfx docs/docfx.json
- name: Deploy
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true