Skip to content

Update to .NET 9 SDK #1901

Update to .NET 9 SDK

Update to .NET 9 SDK #1901

Workflow file for this run

name: github-pages
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
- dotnet-vnext
workflow_dispatch:
permissions:
contents: read
jobs:
build-docs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Lint Markdown files
uses: DavidAnson/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8 # v16.0.0
with:
config: '.markdownlint.json'
globs: |
**/*.md
!**/BenchmarkDotNet.Artifacts/**/*.md
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@a0fba0ca8b9e552d4241ea5ccfaa4ca4162622d0 # v0.41.0
with:
config_path: .github/spellcheck.yml
- name: Setup .NET SDK
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
- name: Generate documentation
env:
DOTNET_ROLL_FORWARD: LatestMajor
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
run: |
dotnet tool restore
dotnet build --configuration Release /p:SKIP_POLLY_ANALYZERS=true
dotnet docfx docs/docfx.json
- name: Publish documentation
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: docs
path: docs/_site
if-no-files-found: error
publish-docs:
needs: [ build-docs ]
runs-on: ubuntu-latest
if: |
github.event.repository.fork == false &&
github.ref_name == github.event.repository.default_branch
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: write
pages: write
steps:
- name: Download documentation
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: docs
path: docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
cname: www.pollydocs.org