Skip to content

Update Git workflow #841

Update Git workflow

Update Git workflow #841

Workflow file for this run

name: github-pages
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
jobs:
publish-docs:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.event_name == 'pull_request' && github.event.ref || github.workflow }}
cancel-in-progress: false
permissions:
contents: write
pages: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Lint Markdown files
uses: DavidAnson/markdownlint-cli2-action@455b6612a7b7a80f28be9e019b70abdd11696e4e # v14.0.0
with:
config: '.markdownlint.json'
globs: |
**/*.md
!**/BenchmarkDotNet.Artifacts/**/*.md
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@737c1f7be0fa441a9d64a3763f9dcacf20a284d4 # v0.35.0
with:
config_path: .github/spellcheck.yml
- name: Setup .NET SDK
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
- name: Generate documentation
run: |
dotnet tool restore
dotnet build --configuration Release /p:SKIP_POLLY_ANALYZERS=true
dotnet docfx docs/docfx.json
- name: Deploy to GitHub Pages
if: |
github.event.repository.fork == false &&
github.ref_name == github.event.repository.default_branch
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
cname: www.pollydocs.org